More cbm510 changes to make file I/O and kernal access work
git-svn-id: svn://svn.cc65.org/cc65/trunk@2846 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
45
libsrc/cbm510/ksetnam.s
Normal file
45
libsrc/cbm510/ksetnam.s
Normal file
@@ -0,0 +1,45 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 2003-12-18
|
||||
;
|
||||
; SETNAM kernal call.
|
||||
;
|
||||
; NOTE: The routine does not work like that in the CBM610 kernal (which works
|
||||
; different than that on all other CBMs). Instead, it works like on all other
|
||||
; Commodore machines. No segment has to be passed, the current segment is
|
||||
; assumed.
|
||||
|
||||
.export SETNAM
|
||||
|
||||
.import sys_bank, restore_bank
|
||||
.import sysp0: zp, ktmp: zp
|
||||
|
||||
.include "cbm510.inc"
|
||||
|
||||
.proc SETNAM
|
||||
|
||||
pha
|
||||
jsr sys_bank
|
||||
sty ktmp
|
||||
|
||||
txa
|
||||
ldy #$90 ; FNAM
|
||||
sta (sysp0),y
|
||||
|
||||
lda ktmp
|
||||
iny
|
||||
sta (sysp0),y
|
||||
|
||||
lda ExecReg ; Assume name is always in this segment
|
||||
ldy #$92 ; FNAM_SEG
|
||||
sta (sysp0),y
|
||||
|
||||
ldy #$9D ; FNAM_LEN
|
||||
pla
|
||||
sta (sysp0),y
|
||||
ldy ktmp
|
||||
jmp restore_bank
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user