cc65/libsrc/cbm610/ksetnam.s
cuz a7042ddbe4 Complete redesign of the CBM610 support.
Use wrappers to call the kernal in bank 15 instead of implementing kernal
functionality within the cc65 libs (eats performance but is much smaller and
simpler).
Improved startup/shutdown code allows a return to the system bank without
calling the BASIC cold start vector.


git-svn-id: svn://svn.cc65.org/cc65/trunk@2793 b7a2c559-68d2-44c3-8de9-860c34a00d81
2003-12-20 23:13:26 +00:00

46 lines
874 B
ArmAsm

;
; 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 "cbm610.inc"
.proc SETNAM
pha
jsr sys_bank
sty ktmp
txa
ldy #FNAM_ADR
sta (sysp0),y
lda ktmp
iny
sta (sysp0),y
lda ExecReg ; Assume name is always in this segment
ldy #FNAM_SEG
sta (sysp0),y
ldy #FNAM_LEN
pla
sta (sysp0),y
ldy ktmp
jmp restore_bank
.endproc