mirror of
https://github.com/cc65/cc65.git
synced 2024-06-08 15:29:37 +00:00
Normalized coding style.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5494 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
286d5979a2
commit
baa6c53dec
|
@ -15,11 +15,12 @@
|
|||
.export sectab_1541_l, sectab_1541_h ; for log_to_phys
|
||||
.import popax,__oserror
|
||||
.importzp ptr1,ptr2,ptr3,tmp1,tmp2,tmp3,tmp4
|
||||
|
||||
.include "dio.inc"
|
||||
.include "geossym.inc"
|
||||
.include "const.inc"
|
||||
|
||||
.proc _dio_phys_to_log
|
||||
_dio_phys_to_log:
|
||||
sta ptr1
|
||||
stx ptr1+1 ; pointer to result
|
||||
|
||||
|
@ -173,8 +174,6 @@ _nomult:
|
|||
sta tmp2
|
||||
jmp dio_ctsend
|
||||
|
||||
.endproc
|
||||
|
||||
.rodata
|
||||
|
||||
sectab_1541_l:
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
.export _dio_open, _dio_close
|
||||
.import __oserror, _OpenDisk
|
||||
.importzp ptr1, tmp1
|
||||
|
||||
.include "dio.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
@ -25,7 +26,7 @@ sectsizetab:
|
|||
|
||||
.code
|
||||
|
||||
.proc _dio_open
|
||||
_dio_open:
|
||||
pha
|
||||
tax
|
||||
lda driveType,x ; check if there's a device
|
||||
|
@ -71,9 +72,7 @@ _inv_drive:
|
|||
tax
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
.proc _dio_close
|
||||
_dio_close:
|
||||
sta ptr1
|
||||
stx ptr1+1
|
||||
lda #0
|
||||
|
@ -82,4 +81,3 @@ _inv_drive:
|
|||
sta __oserror ; success
|
||||
tax
|
||||
rts ; return no error
|
||||
.endproc
|
||||
|
|
|
@ -8,16 +8,19 @@
|
|||
.import popax,pushax,_dio_log_to_phys
|
||||
.importzp ptr1
|
||||
.export dio_params,dio_secnum
|
||||
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "dio.inc"
|
||||
|
||||
.bss
|
||||
dio_secnum: .res 2
|
||||
|
||||
dio_secnum:
|
||||
.res 2
|
||||
|
||||
.code
|
||||
.proc dio_params
|
||||
|
||||
dio_params:
|
||||
sta r4L
|
||||
stx r4H
|
||||
|
||||
|
@ -47,5 +50,3 @@ dio_secnum: .res 2
|
|||
lda #<r1L
|
||||
ldx #>r1H
|
||||
jmp _dio_log_to_phys
|
||||
|
||||
.endproc
|
||||
|
|
|
@ -11,15 +11,13 @@
|
|||
|
||||
.import dio_params, __oserror
|
||||
.export _dio_read
|
||||
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
|
||||
.proc _dio_read
|
||||
|
||||
_dio_read:
|
||||
jsr dio_params
|
||||
jsr ReadBlock
|
||||
stx __oserror
|
||||
txa
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
.importzp ptr1,ptr2,ptr3,tmp1,tmp2
|
||||
.import popax,__oserror
|
||||
.import sectab_1541_l, sectab_1541_h
|
||||
|
||||
.include "dio.inc"
|
||||
.include "geossym.inc"
|
||||
.include "const.inc"
|
||||
|
||||
.proc _dio_log_to_phys
|
||||
|
||||
_dio_log_to_phys:
|
||||
; check device type
|
||||
sta ptr1
|
||||
stx ptr1+1 ; pointer to result (struct dio_phys_pos)
|
||||
|
@ -178,5 +178,3 @@ _got81: lda tmp1
|
|||
inx
|
||||
stx tmp1
|
||||
jmp dio_stcend
|
||||
|
||||
.endproc
|
||||
|
|
|
@ -11,13 +11,11 @@
|
|||
|
||||
.import dio_params, setoserror
|
||||
.export _dio_write
|
||||
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
|
||||
.proc _dio_write
|
||||
|
||||
_dio_write:
|
||||
jsr dio_params
|
||||
jsr WriteBlock
|
||||
jmp setoserror
|
||||
|
||||
.endproc
|
||||
|
|
|
@ -11,15 +11,13 @@
|
|||
|
||||
.import dio_params, __oserror
|
||||
.export _dio_write_verify
|
||||
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
|
||||
.proc _dio_write_verify
|
||||
|
||||
_dio_write_verify:
|
||||
jsr dio_params
|
||||
jsr VerWriteBlock
|
||||
stx __oserror
|
||||
txa
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
|
|
@ -12,24 +12,18 @@
|
|||
|
||||
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 "const.inc"
|
||||
.include "errno.inc"
|
||||
.include "fcntl.inc"
|
||||
|
||||
.importzp ptr1, ptr2, ptr3, tmp1
|
||||
.import addysp, popax
|
||||
.import __oserror
|
||||
.import _FindFile, _ReadByte
|
||||
|
||||
.export _open, _close, _read
|
||||
|
||||
|
||||
;--------------------------------------------------------------------------
|
||||
; _open
|
||||
|
||||
_open:
|
||||
|
||||
cpy #4 ; correct # of arguments (bytes)?
|
||||
beq @parmok ; parameter count ok
|
||||
tya ; parm count < 4 shouldn't be needed to be...
|
||||
|
@ -184,8 +178,14 @@ _read:
|
|||
rts
|
||||
|
||||
.bss
|
||||
filedesc: .res 1 ; file open flag - 0 (no file opened) or 1
|
||||
f_track: .res 1 ; values preserved for ReadByte
|
||||
f_sector: .res 1
|
||||
f_offset: .res 2
|
||||
f_buffer: .res 2
|
||||
|
||||
filedesc:
|
||||
.res 1 ; file open flag - 0 (no file opened) or 1
|
||||
f_track:
|
||||
.res 1 ; values preserved for ReadByte
|
||||
f_sector:
|
||||
.res 1
|
||||
f_offset:
|
||||
.res 2
|
||||
f_buffer:
|
||||
.res 2
|
||||
|
|
|
@ -6,14 +6,12 @@
|
|||
;
|
||||
|
||||
.include "zeropage.inc"
|
||||
|
||||
.include "joy-kernel.inc"
|
||||
.include "joy-error.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.macpack generic
|
||||
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
; Header. Includes jump table
|
||||
|
||||
|
@ -47,11 +45,9 @@
|
|||
|
||||
JOY_COUNT = 2 ; Number of joysticks we support
|
||||
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
; Data.
|
||||
|
||||
|
||||
.code
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
|
|
@ -4,10 +4,8 @@
|
|||
; 2010-08-18, Greg King
|
||||
|
||||
.include "zeropage.inc"
|
||||
|
||||
.include "tgi-kernel.inc"
|
||||
.include "tgi-error.inc"
|
||||
|
||||
.include "const.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
@ -90,29 +88,39 @@ Y2 = ptr4
|
|||
|
||||
.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
|
||||
PALETTE: .res 2 ; The current palette
|
||||
ERROR:
|
||||
.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
|
||||
TEXTMAGX: .res 1
|
||||
TEXTMAGY: .res 1
|
||||
TEXTDIR: .res 1
|
||||
TEXTMAGX:
|
||||
.res 1
|
||||
TEXTMAGY:
|
||||
.res 1
|
||||
TEXTDIR:
|
||||
.res 1
|
||||
|
||||
; Constants and tables
|
||||
|
||||
.rodata
|
||||
|
||||
DEFPALETTE: .byte $00, $0f ; White on black
|
||||
DEFPALETTE:
|
||||
.byte $00, $0f ; White on black
|
||||
PALETTESIZE = * - DEFPALETTE
|
||||
|
||||
; 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
|
||||
; colors BROWN and GRAY3 are wrong
|
||||
|
||||
|
@ -670,4 +678,3 @@ VDCWriteReg:
|
|||
bpl @L0
|
||||
sta VDC_DATA_REG
|
||||
rts
|
||||
|
||||
|
|
|
@ -6,14 +6,11 @@
|
|||
; 06,20,25.12.2002
|
||||
|
||||
.include "zeropage.inc"
|
||||
|
||||
.include "em-kernel.inc"
|
||||
.include "em-error.inc"
|
||||
|
||||
|
||||
.macpack generic
|
||||
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
; Header. Includes jump table
|
||||
|
||||
|
@ -51,8 +48,10 @@ VDC_DATA = 31
|
|||
|
||||
.data
|
||||
|
||||
pagecount: .word 64 ; $0000-$3fff as 16k default
|
||||
curpage: .word $ffff ; currently mapped-in page (invalid)
|
||||
pagecount:
|
||||
.word 64 ; $0000-$3fff as 16k default
|
||||
curpage:
|
||||
.word $ffff ; currently mapped-in page (invalid)
|
||||
|
||||
.bss
|
||||
|
||||
|
@ -423,4 +422,3 @@ setup:
|
|||
lda (ptr3),y ; Get number of pages
|
||||
sta tmp1
|
||||
rts
|
||||
|
||||
|
|
|
@ -10,5 +10,6 @@
|
|||
|
||||
.rodata
|
||||
|
||||
_joy_stddrv: .asciiz "geos-stdjoy.joy"
|
||||
_joy_stddrv:
|
||||
.asciiz "geos-stdjoy.joy"
|
||||
|
||||
|
|
|
@ -5,7 +5,10 @@
|
|||
;
|
||||
; const char mouse_stddrv[];
|
||||
;
|
||||
|
||||
.export _mouse_stddrv
|
||||
|
||||
.rodata
|
||||
_mouse_stddrv: .asciiz "geos-stdmou.mou"
|
||||
.rodata
|
||||
|
||||
_mouse_stddrv:
|
||||
.asciiz "geos-stdmou.mou"
|
||||
|
|
|
@ -10,4 +10,5 @@
|
|||
|
||||
.rodata
|
||||
|
||||
_tgi_stddrv: .asciiz "geos-tgi.tgi"
|
||||
_tgi_stddrv:
|
||||
.asciiz "geos-tgi.tgi"
|
||||
|
|
|
@ -310,4 +310,3 @@ __ctype:
|
|||
.byte $00 ; 253/fd _y'_acute__
|
||||
.byte $00 ; 254/fe _sm_thorn__
|
||||
.byte $00 ; 255/ff _y"_dieres_
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user