Normalized coding style.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5494 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
ol.sc
2012-02-07 22:37:13 +00:00
parent 286d5979a2
commit baa6c53dec
24 changed files with 1164 additions and 1169 deletions

View File

@@ -10,22 +10,23 @@
; dio_open sets given device as current and initializes disk
; dio_close does nothing special
.export _dio_open, _dio_close
.import __oserror, _OpenDisk
.importzp ptr1, tmp1
.include "dio.inc"
.include "jumptab.inc"
.include "geossym.inc"
.include "const.inc"
.export _dio_open, _dio_close
.import __oserror, _OpenDisk
.importzp ptr1, tmp1
.include "dio.inc"
.include "jumptab.inc"
.include "geossym.inc"
.include "const.inc"
.bss
sectsizetab:
.res 4 * sst_size ; this is hardcoded
.res 4 * sst_size ; this is hardcoded
.code
.proc _dio_open
_dio_open:
pha
tax
lda driveType,x ; check if there's a device
@@ -39,28 +40,28 @@ sectsizetab:
pla
tay ; drive #
asl a ; make index from drive id
asl a
asl a ; make index from drive id
asl a
tax
lda #0
sta sectsizetab+sst_sectsize,x
lda #128
sta sectsizetab+sst_flag,x ; set flag that drive is "open"
lda #1
sta sectsizetab+sst_sectsize+1,x
lda #0
sta sectsizetab+sst_sectsize,x
lda #128
sta sectsizetab+sst_flag,x ; set flag that drive is "open"
lda #1
sta sectsizetab+sst_sectsize+1,x
tya
sta sectsizetab+sst_driveno,x
stx tmp1
lda #<sectsizetab
sta sectsizetab+sst_driveno,x
stx tmp1
lda #<sectsizetab
clc
adc tmp1
sta tmp1
lda #>sectsizetab
adc #0
adc tmp1
sta tmp1
lda #>sectsizetab
adc #0
tax
lda tmp1
lda tmp1
rts
@@ -71,15 +72,12 @@ _inv_drive:
tax
rts
.endproc
.proc _dio_close
sta ptr1
stx ptr1+1
lda #0
ldy #sst_flag
sta (ptr1),y
sta __oserror ; success
_dio_close:
sta ptr1
stx ptr1+1
lda #0
ldy #sst_flag
sta (ptr1),y
sta __oserror ; success
tax
rts ; return no error
.endproc