shave some bytes

This commit is contained in:
4am 2021-06-19 13:07:09 -04:00
parent daefedbb5d
commit 4b477a9dba
2 changed files with 37 additions and 36 deletions

View File

@ -190,12 +190,15 @@ all_done_set
; stack set to first instruction after string
;-------------------------------
compare
sta tmpa
clc
adc #BASEPAGE
!byte $2C
CompareMemory
sta tmpa
sta cmp1+1
stx cmp1
sty compare_tmp_y
sty tmpy
pla
sta cmp2
pla
@ -206,10 +209,10 @@ CompareMemory
adc cmp2
bcc +
inx
+ sta tmp
+ sta modtmp
txa
pha
lda tmp
lda modtmp
pha
@cmp
lda (cmp2),y
@ -222,14 +225,9 @@ CompareMemory
sec
!byte $24 ; hide CLC
@success clc
php
lda cmp1+1
sec
sbc #BASEPAGE
lda tmpa
ldx cmp1
compare_tmp_y=*+1
ldy #$FD ; SMC
plp
ldy tmpy
bcs +
sta gDisplayBytes
+ rts

View File

@ -29,30 +29,7 @@ quit !byte 4
OneTimeSetup
jsr decrunch ; decompress main Passport code
sty $FE ;;zp_dest_lo = low byte of Passport entry point
ldy #0 ; save a copy of ProDOS system global page
- lda $BF00, y ; (will be copied back and forth by SwapProDOS later)
sta $0F00, y
iny
bne -
ldx #$FF
lda $FBB3 ; ROM MachineID
cmp #$EA ; ][+?
bne +
ldx #$DF ; AND mask to force characters to uppercase on ][+
+
stx kForceLower
jsr ScanForDiskII ; scan slots for Disk II drives
lda DiskIIArray+5
bne +
jsr PrintByID ; no Disk II in slot 6, this is fatal
!byte s_noslot6
jsr WaitForKey
jmp CleanExit
+
jsr ScanForRAMAndHardDisks; scan for things that look like RAM disks or hard disks
+LoadPrefs ; load preferences (if available)
jsr ThisSlot ; get information about selected drive and set gTargetType for main menu
ldx #$0D
ldx #$0D ; copy t00only.pak to $3200
ldy #$32
sty $F1
ldy #$00
@ -65,16 +42,42 @@ OneTimeSetup
inc $F1
dex
bne -
ldy #0 ; save a copy of ProDOS system global page
- lda $BF00, y ; (will be copied back and forth by SwapProDOS later)
sta $0F00, y
iny
bne -
lda $FBB3 ; ROM MachineID
cmp #$EA ; ][+?
bne +
lda #$DF ; AND mask to force characters to uppercase on ][+
sta kForceLower
+
jsr ScanForDiskII ; scan slots for Disk II drives
lda DiskIIArray+5
bne +
jsr PrintByID ; no Disk II in slot 6, this is fatal
!byte s_noslot6
jsr WaitForKey
jmp CleanExit
+
jsr ScanForRAMAndHardDisks; scan for things that look like RAM disks or hard disks
+LoadPrefs ; load preferences (if available)
jsr ThisSlot ; get information about selected drive and set gTargetType for main menu
lda #<MainMenu ; set reset vector
sta $03F2
lda #>MainMenu
sta $03F3
eor #$A5
sta $03F4
jsr $FB6F
lda #<CheckCache ; set up output hook used to store log messages before they scroll off
sta $36
lda #>CheckCache
sta $37
jmp MainMenu
!source "initscan.a"