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

@@ -15,11 +15,12 @@
.export sectab_1541_l, sectab_1541_h ; for log_to_phys .export sectab_1541_l, sectab_1541_h ; for log_to_phys
.import popax,__oserror .import popax,__oserror
.importzp ptr1,ptr2,ptr3,tmp1,tmp2,tmp3,tmp4 .importzp ptr1,ptr2,ptr3,tmp1,tmp2,tmp3,tmp4
.include "dio.inc" .include "dio.inc"
.include "geossym.inc" .include "geossym.inc"
.include "const.inc" .include "const.inc"
.proc _dio_phys_to_log _dio_phys_to_log:
sta ptr1 sta ptr1
stx ptr1+1 ; pointer to result stx ptr1+1 ; pointer to result
@@ -173,8 +174,6 @@ _nomult:
sta tmp2 sta tmp2
jmp dio_ctsend jmp dio_ctsend
.endproc
.rodata .rodata
sectab_1541_l: sectab_1541_l:

View File

@@ -13,6 +13,7 @@
.export _dio_open, _dio_close .export _dio_open, _dio_close
.import __oserror, _OpenDisk .import __oserror, _OpenDisk
.importzp ptr1, tmp1 .importzp ptr1, tmp1
.include "dio.inc" .include "dio.inc"
.include "jumptab.inc" .include "jumptab.inc"
.include "geossym.inc" .include "geossym.inc"
@@ -25,7 +26,7 @@ sectsizetab:
.code .code
.proc _dio_open _dio_open:
pha pha
tax tax
lda driveType,x ; check if there's a device lda driveType,x ; check if there's a device
@@ -71,9 +72,7 @@ _inv_drive:
tax tax
rts rts
.endproc _dio_close:
.proc _dio_close
sta ptr1 sta ptr1
stx ptr1+1 stx ptr1+1
lda #0 lda #0
@@ -82,4 +81,3 @@ _inv_drive:
sta __oserror ; success sta __oserror ; success
tax tax
rts ; return no error rts ; return no error
.endproc

View File

@@ -8,16 +8,19 @@
.import popax,pushax,_dio_log_to_phys .import popax,pushax,_dio_log_to_phys
.importzp ptr1 .importzp ptr1
.export dio_params,dio_secnum .export dio_params,dio_secnum
.include "geossym.inc" .include "geossym.inc"
.include "jumptab.inc" .include "jumptab.inc"
.include "dio.inc" .include "dio.inc"
.bss .bss
dio_secnum: .res 2
dio_secnum:
.res 2
.code .code
.proc dio_params
dio_params:
sta r4L sta r4L
stx r4H stx r4H
@@ -47,5 +50,3 @@ dio_secnum: .res 2
lda #<r1L lda #<r1L
ldx #>r1H ldx #>r1H
jmp _dio_log_to_phys jmp _dio_log_to_phys
.endproc

View File

@@ -11,15 +11,13 @@
.import dio_params, __oserror .import dio_params, __oserror
.export _dio_read .export _dio_read
.include "geossym.inc" .include "geossym.inc"
.include "jumptab.inc" .include "jumptab.inc"
.proc _dio_read _dio_read:
jsr dio_params jsr dio_params
jsr ReadBlock jsr ReadBlock
stx __oserror stx __oserror
txa txa
rts rts
.endproc

View File

@@ -14,12 +14,12 @@
.importzp ptr1,ptr2,ptr3,tmp1,tmp2 .importzp ptr1,ptr2,ptr3,tmp1,tmp2
.import popax,__oserror .import popax,__oserror
.import sectab_1541_l, sectab_1541_h .import sectab_1541_l, sectab_1541_h
.include "dio.inc" .include "dio.inc"
.include "geossym.inc" .include "geossym.inc"
.include "const.inc" .include "const.inc"
.proc _dio_log_to_phys _dio_log_to_phys:
; check device type ; check device type
sta ptr1 sta ptr1
stx ptr1+1 ; pointer to result (struct dio_phys_pos) stx ptr1+1 ; pointer to result (struct dio_phys_pos)
@@ -178,5 +178,3 @@ _got81: lda tmp1
inx inx
stx tmp1 stx tmp1
jmp dio_stcend jmp dio_stcend
.endproc

View File

@@ -11,13 +11,11 @@
.import dio_params, setoserror .import dio_params, setoserror
.export _dio_write .export _dio_write
.include "geossym.inc" .include "geossym.inc"
.include "jumptab.inc" .include "jumptab.inc"
.proc _dio_write _dio_write:
jsr dio_params jsr dio_params
jsr WriteBlock jsr WriteBlock
jmp setoserror jmp setoserror
.endproc

View File

@@ -11,15 +11,13 @@
.import dio_params, __oserror .import dio_params, __oserror
.export _dio_write_verify .export _dio_write_verify
.include "geossym.inc" .include "geossym.inc"
.include "jumptab.inc" .include "jumptab.inc"
.proc _dio_write_verify _dio_write_verify:
jsr dio_params jsr dio_params
jsr VerWriteBlock jsr VerWriteBlock
stx __oserror stx __oserror
txa txa
rts rts
.endproc

View File

@@ -12,24 +12,18 @@
FILEDES = 3 ; first free to use file descriptor FILEDES = 3 ; first free to use file descriptor
.importzp ptr1, ptr2, ptr3, tmp1
.import addysp, popax
.import __oserror
.import _FindFile, _ReadByte
.export _open, _close, _read
.include "geossym.inc" .include "geossym.inc"
.include "const.inc" .include "const.inc"
.include "errno.inc" .include "errno.inc"
.include "fcntl.inc" .include "fcntl.inc"
.importzp ptr1, ptr2, ptr3, tmp1
.import addysp, popax
.import __oserror
.import _FindFile, _ReadByte
.export _open, _close, _read
;--------------------------------------------------------------------------
; _open
_open: _open:
cpy #4 ; correct # of arguments (bytes)? cpy #4 ; correct # of arguments (bytes)?
beq @parmok ; parameter count ok beq @parmok ; parameter count ok
tya ; parm count < 4 shouldn't be needed to be... tya ; parm count < 4 shouldn't be needed to be...
@@ -184,8 +178,14 @@ _read:
rts rts
.bss .bss
filedesc: .res 1 ; file open flag - 0 (no file opened) or 1
f_track: .res 1 ; values preserved for ReadByte filedesc:
f_sector: .res 1 .res 1 ; file open flag - 0 (no file opened) or 1
f_offset: .res 2 f_track:
f_buffer: .res 2 .res 1 ; values preserved for ReadByte
f_sector:
.res 1
f_offset:
.res 2
f_buffer:
.res 2

View File

@@ -6,14 +6,12 @@
; ;
.include "zeropage.inc" .include "zeropage.inc"
.include "joy-kernel.inc" .include "joy-kernel.inc"
.include "joy-error.inc" .include "joy-error.inc"
.include "geossym.inc" .include "geossym.inc"
.macpack generic .macpack generic
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
@@ -47,11 +45,9 @@
JOY_COUNT = 2 ; Number of joysticks we support JOY_COUNT = 2 ; Number of joysticks we support
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Data. ; Data.
.code .code
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------

View File

@@ -4,10 +4,8 @@
; 2010-08-18, Greg King ; 2010-08-18, Greg King
.include "zeropage.inc" .include "zeropage.inc"
.include "tgi-kernel.inc" .include "tgi-kernel.inc"
.include "tgi-error.inc" .include "tgi-error.inc"
.include "const.inc" .include "const.inc"
.include "jumptab.inc" .include "jumptab.inc"
.include "geossym.inc" .include "geossym.inc"
@@ -90,29 +88,39 @@ Y2 = ptr4
.bss .bss
SCRBASE: .res 1 ; High byte of screen base (64k VDC only) SCRBASE:
.res 1 ; High byte of screen base (64k VDC only)
ERROR: .res 1 ; Error code ERROR:
PALETTE: .res 2 ; The current palette .res 1 ; Error code
PALETTE:
.res 2 ; The current palette
BITMASK: .res 1 ; $00 = clear, $01 = set pixels BITMASK:
.res 1 ; $00 = clear, $01 = set pixels
OLDCOLOR: .res 1 ; colors before entering gfx mode OLDCOLOR:
.res 1 ; colors before entering gfx mode
; Text output stuff ; Text output stuff
TEXTMAGX: .res 1 TEXTMAGX:
TEXTMAGY: .res 1 .res 1
TEXTDIR: .res 1 TEXTMAGY:
.res 1
TEXTDIR:
.res 1
; Constants and tables ; Constants and tables
.rodata .rodata
DEFPALETTE: .byte $00, $0f ; White on black DEFPALETTE:
.byte $00, $0f ; White on black
PALETTESIZE = * - DEFPALETTE PALETTESIZE = * - DEFPALETTE
; color translation table (indexed by VIC color) ; color translation table (indexed by VIC color)
COLTRANS: .byte $00, $0f, $08, $06, $0a, $04, $02, $0c COLTRANS:
.byte $00, $0f, $08, $06, $0a, $04, $02, $0c
.byte $0d, $0b, $09, $01, $0e, $05, $03, $07 .byte $0d, $0b, $09, $01, $0e, $05, $03, $07
; colors BROWN and GRAY3 are wrong ; colors BROWN and GRAY3 are wrong
@@ -670,4 +678,3 @@ VDCWriteReg:
bpl @L0 bpl @L0
sta VDC_DATA_REG sta VDC_DATA_REG
rts rts

View File

@@ -6,14 +6,11 @@
; 06,20,25.12.2002 ; 06,20,25.12.2002
.include "zeropage.inc" .include "zeropage.inc"
.include "em-kernel.inc" .include "em-kernel.inc"
.include "em-error.inc" .include "em-error.inc"
.macpack generic .macpack generic
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
@@ -51,8 +48,10 @@ VDC_DATA = 31
.data .data
pagecount: .word 64 ; $0000-$3fff as 16k default pagecount:
curpage: .word $ffff ; currently mapped-in page (invalid) .word 64 ; $0000-$3fff as 16k default
curpage:
.word $ffff ; currently mapped-in page (invalid)
.bss .bss
@@ -423,4 +422,3 @@ setup:
lda (ptr3),y ; Get number of pages lda (ptr3),y ; Get number of pages
sta tmp1 sta tmp1
rts rts

View File

@@ -10,5 +10,6 @@
.rodata .rodata
_joy_stddrv: .asciiz "geos-stdjoy.joy" _joy_stddrv:
.asciiz "geos-stdjoy.joy"

View File

@@ -5,7 +5,10 @@
; ;
; const char mouse_stddrv[]; ; const char mouse_stddrv[];
; ;
.export _mouse_stddrv .export _mouse_stddrv
.rodata .rodata
_mouse_stddrv: .asciiz "geos-stdmou.mou"
_mouse_stddrv:
.asciiz "geos-stdmou.mou"

View File

@@ -10,4 +10,5 @@
.rodata .rodata
_tgi_stddrv: .asciiz "geos-tgi.tgi" _tgi_stddrv:
.asciiz "geos-tgi.tgi"

View File

@@ -310,4 +310,3 @@ __ctype:
.byte $00 ; 253/fd _y'_acute__ .byte $00 ; 253/fd _y'_acute__
.byte $00 ; 254/fe _sm_thorn__ .byte $00 ; 254/fe _sm_thorn__
.byte $00 ; 255/ff _y"_dieres_ .byte $00 ; 255/ff _y"_dieres_