Questions tagged [z80]

The Z80 is an 8-bit CPU designed by Zilog to be a backwards-compatible enhancement of the Intel 8080. It has been in continuous wide use since 1976 and was formerly popular in microcomputers, such as models of the Tandy (Radio Shack) TRS-80 microcomputer and their derivatives, the ZX Spectrum and the MSX standard. Presently its main use is in embedded systems.

Resources on the Internet:

The Zilog Z80 CPU User Manual

Rodnay Zaks wrote a classic book on the Z80: Programming the Z80

See also:

182 questions
0
votes
3 answers

Converting an unsigned 16-bit integer from HL into text using my own non-ASCII charmap as decimal, with LR35902 assembly

I need to figure out how to make a routine for the LR35902 (the Game Boy's Z80-like CPU) that will take the contents of HL (not where it points to, the actual number stored in it) and convert it into 1 to 5 (actual values would range from 0 to…
Tachytaenius
  • 147
  • 8
0
votes
2 answers

Assembly bubble sort for z80

I have an assignment for my university. I need to make a program in assembly for the z80 processor. The program should do the following. There are 20 numbers stored in 20 continuous memory addresses starting from 0201H. The program should check the…
0
votes
2 answers

PutS only displaying one character on TI-84 Plus Silver edition

I have recently discovered that my TI-84 plus silver edition can be programmed in hex. I have been messing around with it but have had a few bugs. Whenever I try to make a bcall to PutS it only prints one character and moves on. If I add a second…
user2628615
  • 13
  • 3
  • 10
0
votes
2 answers

Assembler wrong code

I've been having some trouble with a Z80 assembler code and maybe you could help me out. The code is as follows: aseg org 3000h start: ld A, (tops) ld B, A cycle: add A, B djnz cycle rst 38h tops: db 3 end start The…
0
votes
1 answer

How to perform Continuous Array Read for ATMEL Flash Chip AT45DB081D

I'm attempting to talk a AT45DB081D chip over SPI using the following code: void efContinuousArrayRead(unsigned char *data, unsigned int page, unsigned int offset, unsigned int length) { unsigned int index; FLASH_SEL_ON SPIShift(0x03);…
RQDQ
  • 15,461
  • 2
  • 32
  • 59
0
votes
1 answer

Pointer converter returning incorrect values

I'm trying to create a Z80 offset-pointer converter, but when I compile the program and test it, the output variables come out as zero. The math behind it goes like this: Take the offset that you wish to point to. Take the last four digits of the…
AlexTheRose
  • 125
  • 1
  • 1
  • 8
0
votes
3 answers

Single pass z80 assembler (source or useable on windows)

I have recently got my hands on a Z80 system and have been writing a dissasmbler for a debugger (pushing in instructions that are pulled from the memory of the Z80y). I can get the instruction however the problem arises when assembling the ASM, I am…
Andy A
  • 137
  • 1
  • 11
0
votes
2 answers

Z80 how are different program blocks loaded at different locations in memory?

My Question Building the code below i get: "319920C30020C30A20FBED563E00C600CA0520F33E55D3073E00FBC9" My Problem is I assumed that this would be padded with zeros such that each block of code is at the requested addresses 0000H, 0038H, and 2000H in…
0
votes
2 answers

Z80 flags - how to generate?

I'm designing a Z80 compatible project. I'm up to designing the flags register. I originally thought that the flags were generated straight from the ALU depending on the inputs and type of ALU operation. But after looking at the instructions and the…
-1
votes
1 answer

Z80 assembly storing a value in a register for longer time

I have the following part of code: ld a, 2 INIT: ld ix, AFIS ld c, a cp 2 jp z INIT2 call SCAN INIT2: ld ix, AFIS2 call SCAN INIT3: ld ix, AFIS3 ld c, a cp 2 jp z INIT4 The…
gameloverr
  • 53
  • 1
  • 8
-1
votes
1 answer

Z80 assembly program gone haywire

I am working on a small Z80 assembly program, one of my first. Here is my Z-80 assembly code: main: LD SP, $FFFF ; start by setting stack to top of RAM printChar1: LD A, 'X' ; this works …
TomServo
  • 7,248
  • 5
  • 30
  • 47
-1
votes
2 answers

How to write a custom assembly compiler (sort of) in VB.NET

I've been trying to write a simple script compiler for a custom language used by the Game Boy Advance's Z80 processor. All I want it to do is look at a human-readable command, take it and its arguments and convert it into a hexadecimal value into a…
AlexTheRose
  • 125
  • 1
  • 1
  • 8
-2
votes
1 answer

What is maximum of RAM and EEPROM use for Z80

I don't understand how function memory adress so i whant to buy memory for my zilog z80 but I don't know whitch one. I whant to know the maximum of memory can be using whith Zilog Z80.
Mr Lokki
  • 11
  • 1
-2
votes
2 answers

having trouble with TI-83+ z80 hex program

I made an AsmProgram that runs this hex code: 9D95:00 9D96:00 9D97:00 9D98:00 9D99:0E 9D9A:09 9D9B:3E 9D9C:00 9D9D:EF 9D9E:5D 9D9F:49 9DA0:06 9DA1:80 9DA2:A8 9DA3:CB 9DA4:47 9DA5:CB 9DA6:0F 9DA7:CA 9DA8:95 9DA9:9D 9DAA:10 9DAB:F9 9DAC:C9 it's…
pi_squared
  • 91
  • 6
-2
votes
1 answer

What is the representation of values in the LD instruction in the 8-bit Z80 processor?

I am having difficulties with understanding what's going on in this code: LD A, -1; LD B, 130; ADD A, B; And what flags are set to 1 after the ADD instruction. Basically, I don't know, what value is stored inside the register B. I cannot find any…
Mateusz Piotrowski
  • 8,029
  • 10
  • 53
  • 79
1 2 3
12
13