ack/plat/cpm/libsys/_bdos.s

20 lines
377 B
ArmAsm
Raw Normal View History

2007-04-27 22:42:41 +00:00
#
#include "asm.h"
2007-04-27 22:42:41 +00:00
! Calls a BDOS routine and returns the result.
! a = BDOS opcode
2007-04-27 22:42:41 +00:00
.define call_bdos
call_bdos:
pop h ! pop return address
pop d ! pop parameter (possibly junk)
push d
push h
2007-04-27 22:42:41 +00:00
push b ! save FP as the BDOS will corrupt it
mov c, a ! move opcode to C
call 0x0005
pop b ! restore FP
2007-04-27 22:42:41 +00:00
2019-06-11 19:33:57 +00:00
xchg ! DE = HL
ret