2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 03.06.1999
|
|
|
|
;
|
2001-10-10 20:35:07 +00:00
|
|
|
; unsigned int __fastcall__ cbm_k_load (unsigned char flag, unsigned addr);
|
2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
|
2018-07-03 19:47:42 +00:00
|
|
|
.include "cbm.inc"
|
2018-07-04 14:40:28 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.export _cbm_k_load
|
2001-10-10 20:35:07 +00:00
|
|
|
.import __oserror
|
2013-05-09 11:56:54 +00:00
|
|
|
.import popa
|
|
|
|
.importzp ptr1
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2001-03-13 22:48:19 +00:00
|
|
|
_cbm_k_load:
|
2013-05-09 11:56:54 +00:00
|
|
|
sta ptr1
|
|
|
|
stx ptr1+1
|
|
|
|
jsr popa ; get flag
|
|
|
|
ldx ptr1
|
|
|
|
ldy ptr1+1
|
|
|
|
jsr LOAD
|
|
|
|
bcc @Ok
|
2001-10-10 20:35:07 +00:00
|
|
|
sta __oserror
|
|
|
|
ldx ptr1
|
|
|
|
ldy ptr1+1
|
|
|
|
@Ok: txa
|
|
|
|
pha
|
|
|
|
tya
|
|
|
|
tax
|
|
|
|
pla
|
|
|
|
rts
|