use smartport.aii

This commit is contained in:
Kelvin Sherlock 2021-07-27 21:31:01 -04:00
parent 95aa4d8bd5
commit dbfe66cc99
1 changed files with 28 additions and 24 deletions

View File

@ -18,6 +18,11 @@
__smartport__ set 1 __smartport__ set 1
if __smartport__ then
include 'smartport.aii'
endif
buffer equ $3000 buffer equ $3000
dp record 0 dp record 0
@ -44,12 +49,12 @@ file_id ds.l 1
if not __smartport__ then if not __smartport__ then
pro record $42 pro record $42
cmd ds.b 1 cmd ds.b 1
unit ds.b 1 unit ds.b 1
buffer ds.b 2 dataBuffer ds.b 2
block ds.b 2 blockNumber ds.b 2
endr endr
endif endif
@ -106,13 +111,12 @@ cat_str dcb.b 32, 0
endr endr
if __smartport__ then if __smartport__ then
sp record sp record
ReadBlock equ $01 pCount dc.b 3
pcount dc.b 3 unit dc.b 1
unit dc.b 1 dataBuffer dc.w $3000 ; name conflict...
buffer dc.w $3000 ; name conflict... blockNumber dc.l 0 ; actually 24-bit
block dc.l 0 ; actually 24-bit endr
endr
endif endif
@ -136,7 +140,7 @@ getbootname proc
; get the volume name from the HFS MDB.... ; get the volume name from the HFS MDB....
if not __smartport__ then if not __smartport__ then
lda #buffer lda #buffer
sta pro.buffer sta pro.dataBuffer
endif endif
lda #2 lda #2
jsr read_block_abs jsr read_block_abs
@ -243,7 +247,7 @@ readfile proc
if not __smartport__ then if not __smartport__ then
lda #buffer lda #buffer
sta pro.buffer sta pro.dataBuffer
endif endif
; need to re-set cmd/slot as well? ; need to re-set cmd/slot as well?
@ -982,7 +986,7 @@ startup proc
if not __smartport__ then if not __smartport__ then
lda #buffer lda #buffer
sta pro.buffer sta pro.dataBuffer
short m short m
lda #1 lda #1
sta pro.cmd sta pro.cmd
@ -1113,9 +1117,9 @@ read
lda #$6800 lda #$6800
if __smartport__ then if __smartport__ then
sta sp.buffer sta sp.dataBuffer
else else
sta pro.buffer sta pro.dataBuffer
endif endif
@loop lda r0 @loop lda r0
@ -1124,11 +1128,11 @@ read
; clc ; clc
lda #512 lda #512
if __smartport__ then if __smartport__ then
adc sp.buffer adc sp.dataBuffer
sta sp.buffer sta sp.dataBuffer
else else
adc pro.buffer adc pro.dataBuffer
sta pro.buffer sta pro.dataBuffer
endif endif
inc r0 inc r0
dec blocks dec blocks
@ -1140,9 +1144,9 @@ read
lda #buffer lda #buffer
if __smartport__ then if __smartport__ then
sta sp.buffer sta sp.dataBuffer
else else
sta pro.buffer ; kind of important... sta pro.dataBuffer ; kind of important...
endif endif
lda #0 lda #0