home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpm
/
apple
/
pcpi.mac
< prev
next >
Wrap
Text File
|
1985-04-19
|
577b
|
39 lines
; MODULE PCPI
; Module use:
; Place parameters on stack.
; Call routine
.z80
readbyte equ 0ffe0h
writebyte equ 0ffe3h
readword equ 0ffe6h
writeword equ 0ffe9h
; Peek - Returns 1 Apple byte at <addr>
; Parms on stack <addr> <2 bytes> Address of memory to peek
jr peek
; Poke - Poke memory into apple
; Parms. <addr> <2 bytes> <data> <2 bytes>
pop hl
pop bc
pop de
push hl
ld h,b
ld l,c
ld c,7
call writebyte
call writeword
ld c,l
call writebyte
ret
peek: pop hl
pop de
push hl
ld c,6
call writebyte
call writeword
call readbyte
ld l,a
ld h,0
ret
end