z80 Questions

3

I am searching for a list of all assembler functions/calls, but seem to be unable to find any for the TI-84 or TI-83 (their assembler code is nearly the same). Additionally, I could neither find a ...
Pantsuit asked 10/1, 2020 at 19:37

1

Solved

I am attempting to run the following code: HLDIVC: LD B,16 D0: XOR A ADD HL,HL RLA CP C JR C, D1 INC L SUB C DJNZ D0 D1: RET It's an adaptation of the original code: (found here) HL_Div_C...
Neille asked 24/12, 2021 at 2:25

3

Solved

The Game Boy Z80 CPU has a half-carry flag, and I can't seem to find much information about when to set/clear it. What I understand so far is that any 8-bit add, subtract, shift, or rotate operati...
Bethune asked 15/1, 2012 at 8:18

4

Solved

Apologies for this seemingly minor question, but I can't seem to find the answer anywhere - I'm just coming up to implementing the DAA instruction in my Z80 emulator, and I noticed in the Zilog man...
Rattan asked 14/11, 2011 at 9:34

4

Solved

I'm trying to write two bytes (color values) to the VRAM of my TI-84 Plus CE-T calculator, which uses the Zilog eZ80 CPU. The VRAM starts at 0xD40000 and is 0x25800 bytes long. The calculator has a...
Desideratum asked 13/8, 2019 at 18:29

2

Solved

I have the following code: struct something { char *(*choices)[2]; }; char* arr[2] = {"foo", "bar"}; int main(void) { struct something obj; obj.choices = &arr; return 0; } When I compil...
Baldpate asked 11/5, 2019 at 12:44

1

Solved

Since the Gameboy's processor, the LR35902, is a hybrid of the Z80 and the Intel 8080, keeping in mind that the Z80 and the Intel 8080 were designed to be mostly cross-compatible anyways, could any...
Storer asked 24/8, 2018 at 17:8

2

Solved

While looking through the Gameboy's instruction set, I came across instructions such as: LD A, A LD B, B LD C, C LD D, D ... Each of these instructions has it's own opcode in this table, which ...
Viniculture asked 5/5, 2018 at 9:7

1

Solved

I've written a Z80 disassembler that runs from the ROM in my SBC. One of the last things I need to do (as-yet-unspotted bugs aside) is to translate relative addresses and output them as absolute ad...
Ardenia asked 2/3, 2018 at 14:17

3

Solved

I notice from the Zilog datasheet on the Z80 that with the I/O (IN and OUT) group of instructions, the contents of various registers are often placed in the top 8 bits of the address bus (depending...
Oxcart asked 14/12, 2011 at 16:16

1

In the flag register of Z80, 8080, 8085, and 8086 processors, what is the purpose of bits 1, 3, 5, which are documented as "reserved" or "undefined"?
Aeciospore asked 30/6, 2017 at 7:34

2

Solved

This is not a homework problem, it's for a game I'm developing. I have two 16-bit RGB colors, and would like to vary their six channels according to six other four-bit quantities. The algorithm is...
Samirasamisen asked 15/5, 2017 at 14:16

1

Solved

Hello I'm writing an emulator for Game Boy. I use this reference : Gameboy CPU (LR35902) instruction set This document states that opcodes : 0xE2 LD (C),A and 0xF2 LD A,(C) have a length of...
Satin asked 28/12, 2016 at 0:29

1

Solved

I want to use Visual Studio Code for writing code for my homebrew Z80 Computer. I use z88dk and its tools to compile C, assemble the Z80 asm files etc. I will write parts in assembler and other par...
Lsd asked 16/12, 2016 at 7:37

1

Solved

From what I could gather the Z80 NMI interrupt (0x66) is triggered from an edge detection of the NMI pin. What happens when another edge is detected when still inside the NMI handler code (RETN has...
z80
Mew asked 2/10, 2016 at 8:39

2

Solved

I'm kinda confused about the exact definition of a "machine cycle". For example, some source online say that it is: The four steps which the CPU carries out for each machine language instructi...
Byrd asked 6/8, 2016 at 16:20

1

Solved

Could someone please explain what the opcode 0x08 does on the LR35902 processor. The mnemonic is LD (a16),SP. I'm confused because the stack pointer is a 16-bit value but (a16) is an address to so...
Jenn asked 26/3, 2016 at 20:59

3

Solved

I am planning on creating a Sega Master System emulator over the next few months, as a hobby project in Java (I know it isn't the best language for this but I find it very comfortable to work in, a...
Gunsel asked 19/8, 2011 at 14:21

1

Solved

On the page 87 of the Game Boy CPU Manual it is claimed that the CP n instruction sets the carry flag when there was no borrow and that it means that A < n. This seems to conflict itself, becaus...
Tandie asked 14/7, 2015 at 14:25

2

Solved

I have gotten round to implementing the ADD A,r set of opcodes on my Z80 core. I had a bit of confusion about the carry and overflow flags which I think I've nailed, but I wanted to put it to the c...
Delubrum asked 7/11, 2011 at 9:16

2

Solved

I am trying to create a software delay. Here is a sample program of what I am doing: Address Data Opcode Comment 1800 06 LD, B Load register B with fix value 1801 “ “ Fixed value 1802 05 DEC,...
z80
Wrapped asked 21/3, 2015 at 16:12

3

Solved

I've been working on a Game Boy emulator, and I've noticed that there are certain opcodes that exist that would never change any values, such as LD A, A, LD B, B, etc. and also AND A. The first one...
Undermanned asked 17/10, 2014 at 2:10

8

Solved

I want to take an interest in writing my own simple emulator for the Z80 processor. I have no experience with this type of programming. I am mostly fine with using C-based languages as they a...
Samaveda asked 1/8, 2009 at 3:42

14

Solved

What are your favourite assemblers, compilers, environments, interpreters for the good old ZX Spectrum?
Tilbury asked 16/9, 2008 at 21:46

4

Solved

Me again with another innocuous Z80 question :-) The way my emulator core is currently structured, I am incrementing the lower 7 bits of the memory refresh register every time an opcode byte is fet...
Jester asked 16/12, 2011 at 21:44

© 2022 - 2024 — McMap. All rights reserved.