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

Functions

macro c128lib_RunZ80Code (z80CodeAddress)
 Z80 related macros.
 
macro c128lib_PreZ80Code ()
 
macro c128lib_PostZ80Code ()
 

Function Documentation

◆ c128lib_RunZ80Code()

macro c128lib_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
c128lib_PreZ80Code, c128lib_PostZ80Code
Attention
Code must be preceded with bytes provided from c128lib_PreZ80Code. Also, the bytes provided by must be added to the code c128lib_PostZ80Code.
Since
0.2.0

◆ c128lib_PreZ80Code()

macro c128lib_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
c128lib_PostZ80Code
Attention
This macro must be run before writing the code that will be executed on z80.
Since
0.2.0

◆ c128lib_PostZ80Code()

macro c128lib_PostZ80Code ( )

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

See also
c128lib_PreZ80Code
Attention
This macro must be run after writing the code that will be executed on z80.
Since
0.2.0