A2osX/A2osX.S.Z80.txt
2015-03-14 22:48:35 +01:00

56 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

PR#3
PREFIX /DATA/A2OSX
NEW
INC 1
AUTO 6
.LIST OFF
.OP 65C02
*--------------------------------------
InitZ80 ldx Z80Code.Len
.1 lda Z80Code-1,x
sta $1000-1,x 00000H for Z80
dex
bne .1
stz TmpPtr1
lda #$C1
sta TmpPtr1+1
.2 sta (TmpPtr1)
lda $100D
bmi .8
inc TmpPtr1+1
lda TmpPtr1+1
cmp #$C8
beq .9
clc
adc #$20
sta $100A
bra .2
.8 lda TmpPtr1+1
and #$0F
sta A2osX.Z80Slot
clc
rts
.9 stz A2osX.Z80Slot
sec
rts
*--------------------------------------
* Moved to $1000 (0000H)
*--------------------------------------
Z80Code .HS 31FFFF START: LD SP,0FFFFH Init Stack
.HS 3EFF LD A,0FFH Set Flag
.HS 320D00 LD (FLAG),A
.HS 3200E1 LD (0E100H),A Back to 6502
.HS 18F3 JR START Loop
.HS 00 FLAG: .DB 0
*31FFFF3EFF320D003200E118F300
Z80Code.Len .EQ *-Z80Code
*--------------------------------------
MAN
SAVE A2OSX.S.Z80
LOAD A2OSX.S
ASM