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
This commit is contained in:
@@ -63,15 +63,20 @@ pagecount: .res 1 ; Number of available pages
|
||||
INSTALL:
|
||||
lda #$FF
|
||||
sta curpage ; Invalidate the current page
|
||||
sta pagecount ; Assume all memory available
|
||||
|
||||
ldx UsrMemTop+2
|
||||
cpx #RAMBANK ; Top of memory in bank 2?
|
||||
sec
|
||||
jsr $FF99 ; MEMTOP
|
||||
|
||||
cmp #RAMBANK ; Top of memory in bank 2?
|
||||
bne @L1 ; No: We can use all the memory
|
||||
clc
|
||||
adc UsrMemTop+1
|
||||
@L1: sta pagecount
|
||||
txa
|
||||
sub #OFFS
|
||||
tya
|
||||
sbc #$00
|
||||
sta pagecount
|
||||
|
||||
lda #<EM_ERR_OK
|
||||
@L1: lda #<EM_ERR_OK
|
||||
ldx #>EM_ERR_OK
|
||||
; rts ; Run into UNINSTALL instead
|
||||
|
||||
|
||||
Reference in New Issue
Block a user