c128lib Framework
A Commodore 128 software framework for enabling high-level development of C128 programs.
Loading...
Searching...
No Matches
z80.asm File Reference

Functions

macro RunZ80Code (z80CodeAddress)
 Z80 related macros.
 
macro PreZ80Code ()
 
macro PostZ80Code ()
 

Function Documentation

◆ RunZ80Code()

macro RunZ80Code ( z80CodeAddress )

Z80 related macros.

This module contains macros for running z80 code at request inside 8502 assembly program.

Date
2023 Prepare 8502 processor for z80 activation. This macro will setup JP instruction and address where Z80 should jump and then activate the processor. It also setup Mmu correctly. At the end, Mmu is set to previous status.
Parameters
[in]z80CodeAddressAddress where Z80 code is stored
Remarks
Register .A will be changed.
See also
PreZ80Code, PostZ80Code
Note
Use c128lib_RunZ80Code in z80-global.asm
Attention
Code must be preceded with bytes provided from PreZ80Code. Also, the bytes provided by must be added to the code PostZ80Code.
Since
0.2.0

◆ PreZ80Code()

macro PreZ80Code ( )

Generates z80 pre-code, in order to setup environment for correct z80 code running.

Remarks
Register .A of z80 processor will be changed.
See also
PostZ80Code
Note
Use c128lib_PreZ80Code in z80-global.asm
Attention
This macro must be run before writing the code that will be executed on z80.
Since
0.2.0

◆ PostZ80Code()

macro PostZ80Code ( )

Generates z80 post-code, in order to guarantee that z80 jumps to routine to reactivate 6502.

Remarks
Register .A of z80 processor will be changed.
See also
PreZ80Code
Note
Use c128lib_PostZ80Code in z80-global.asm
Attention
This macro must be run after writing the code that will be executed on z80.
Since
0.2.0