From 7a076cf145866f839592ee63860db1ead38ed799 Mon Sep 17 00:00:00 2001 From: "ol.sc" Date: Wed, 8 Feb 2012 17:21:18 +0000 Subject: [PATCH] Normalized coding style. git-svn-id: svn://svn.cc65.org/cc65/trunk@5502 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/geos-cbm/dio.inc | 31 ++--- libsrc/geos-cbm/diskdrv.inc | 2 +- libsrc/geos-cbm/geossym.inc | 164 +++++++++++----------- libsrc/geos-cbm/geossym2.inc | 14 +- libsrc/geos-cbm/inputdrv.inc | 18 +-- libsrc/geos-cbm/jumptab.inc | 2 +- libsrc/geos-common/const.inc | 2 +- libsrc/geos-common/geosmac.ca65.inc | 207 +++++++++++++++++++--------- 8 files changed, 252 insertions(+), 188 deletions(-) diff --git a/libsrc/geos-cbm/dio.inc b/libsrc/geos-cbm/dio.inc index 24ae0e5e4..7dfe54f07 100644 --- a/libsrc/geos-cbm/dio.inc +++ b/libsrc/geos-cbm/dio.inc @@ -1,19 +1,12 @@ - -;------------------------------------------------------------------------- -; OFFSETS INTO SECTSIZETAB (DIO functions) -;------------------------------------------------------------------------- - -sst_flag = 0 ; length 1 -sst_sectsize = 1 ; 2 -sst_driveno = 3 ; 1 (drive #) -sst_size = 4 ; size of one entry - ; if changed, adapt diopncls.s - -;------------------------------------------------------------------------- -; OFFSETS INTO dio_phys_pos -;------------------------------------------------------------------------- - -diopp_head = 0 ; head -diopp_track = 1 ; track / cylinder -diopp_sector = 3 ; sector -diopp_size = 5 ; size of structure +; offsets into sectsizetab (DIO functions) +sst_flag = 0 ; length 1 +sst_sectsize = 1 ; 2 +sst_driveno = 3 ; 1 (drive #) +sst_size = 4 ; size of one entry + ; if changed, adapt diopncls.s + +; offsets into dio_phys_pos +diopp_head = 0 ; head +diopp_track = 1 ; track / cylinder +diopp_sector = 3 ; sector +diopp_size = 5 ; size of structure diff --git a/libsrc/geos-cbm/diskdrv.inc b/libsrc/geos-cbm/diskdrv.inc index ce106d761..43a93ef9c 100644 --- a/libsrc/geos-cbm/diskdrv.inc +++ b/libsrc/geos-cbm/diskdrv.inc @@ -1,4 +1,4 @@ - +; ;GEOS Disk Driver JumpTab ;reassembled by Maciej 'YTM/Alliance' Witkowiak ;4-2-99 diff --git a/libsrc/geos-cbm/geossym.inc b/libsrc/geos-cbm/geossym.inc index 0e8fbaf6a..6cd250d89 100644 --- a/libsrc/geos-cbm/geossym.inc +++ b/libsrc/geos-cbm/geossym.inc @@ -1,93 +1,93 @@ - +; ;GEOS variable memory locations sorted by address ;reassembled by Maciej 'YTM/Elysium' Witkowiak ;4-2-99 -zpage = $0000 +zpage = $0000 ; -CPU_DDR = $00 -CPU_DATA = $01 +CPU_DDR = $00 +CPU_DATA = $01 ; -r0 = $02 -r0L = $02 -r0H = $03 -r1 = $04 -r1L = $04 -r1H = $05 -r2 = $06 -r2L = $06 -r2H = $07 -r3 = $08 -r3L = $08 -r3H = $09 -r4 = $0a -r4L = $0a -r4H = $0b -r5 = $0c -r5L = $0c -r5H = $0d -r6 = $0e -r6L = $0e -r6H = $0f -r7 = $10 -r7L = $10 -r7H = $11 -r8 = $12 -r8L = $12 -r8H = $13 -r9 = $14 -r9L = $14 -r9H = $15 -r10 = $16 -r10L = $16 -r10H = $17 -r11 = $18 -r11L = $18 -r11H = $19 -r12 = $1a -r12L = $1a -r12H = $1b -r13 = $1c -r13L = $1c -r13H = $1d -r14 = $1e -r14L = $1e -r14H = $1f -r15 = $20 -r15L = $20 -r15H = $21 +r0 = $02 +r0L = $02 +r0H = $03 +r1 = $04 +r1L = $04 +r1H = $05 +r2 = $06 +r2L = $06 +r2H = $07 +r3 = $08 +r3L = $08 +r3H = $09 +r4 = $0a +r4L = $0a +r4H = $0b +r5 = $0c +r5L = $0c +r5H = $0d +r6 = $0e +r6L = $0e +r6H = $0f +r7 = $10 +r7L = $10 +r7H = $11 +r8 = $12 +r8L = $12 +r8H = $13 +r9 = $14 +r9L = $14 +r9H = $15 +r10 = $16 +r10L = $16 +r10H = $17 +r11 = $18 +r11L = $18 +r11H = $19 +r12 = $1a +r12L = $1a +r12H = $1b +r13 = $1c +r13L = $1c +r13H = $1d +r14 = $1e +r14L = $1e +r14H = $1f +r15 = $20 +r15L = $20 +r15H = $21 ; -a0 = $fb -a0L = $fb -a0H = $fc -a1 = $fd -a1L = $fd -a1H = $fe -a2 = $70 -a2L = $70 -a2H = $71 -a3 = $72 -a3L = $72 -a3H = $73 -a4 = $74 -a4L = $74 -a4H = $75 -a5 = $76 -a5L = $76 -a5H = $77 -a6 = $78 -a6L = $78 -a6H = $79 -a7 = $7a -a7L = $7a -a7H = $7b -a8 = $7c -a8L = $7c -a8H = $7d -a9 = $7e -a9L = $7e -a9H = $7f +a0 = $fb +a0L = $fb +a0H = $fc +a1 = $fd +a1L = $fd +a1H = $fe +a2 = $70 +a2L = $70 +a2H = $71 +a3 = $72 +a3L = $72 +a3H = $73 +a4 = $74 +a4L = $74 +a4H = $75 +a5 = $76 +a5L = $76 +a5H = $77 +a6 = $78 +a6L = $78 +a6H = $79 +a7 = $7a +a7L = $7a +a7H = $7b +a8 = $7c +a8L = $7c +a8H = $7d +a9 = $7e +a9L = $7e +a9H = $7f ; diff --git a/libsrc/geos-cbm/geossym2.inc b/libsrc/geos-cbm/geossym2.inc index 0820c8e8a..ced630e34 100644 --- a/libsrc/geos-cbm/geossym2.inc +++ b/libsrc/geos-cbm/geossym2.inc @@ -1,11 +1,11 @@ - +; ;GEOS various variables in OS_ROM area ;reassembled by Maciej 'YTM/Alliance' Witkowiak ;4-2-99 -bootName = $c006 -version = $c00f -nationality = $c010 -sysFlgCopy = $c012 -c128Flag = $c013 -dateCopy = $c018 \ No newline at end of file +bootName = $c006 +version = $c00f +nationality = $c010 +sysFlgCopy = $c012 +c128Flag = $c013 +dateCopy = $c018 \ No newline at end of file diff --git a/libsrc/geos-cbm/inputdrv.inc b/libsrc/geos-cbm/inputdrv.inc index cdb1dc483..4f8b97b65 100644 --- a/libsrc/geos-cbm/inputdrv.inc +++ b/libsrc/geos-cbm/inputdrv.inc @@ -1,16 +1,16 @@ - +; ;GEOS Input Driver Jump Tab ;reassembled by Maciej 'YTM/Alliance' Witkowiak ;4-2-99 ;for C64 -;MOUSE_JMP = $fe80 -SlowMouse = $fe83 -UpdateMouse = $fe86 -SetMouse = $fe89 +;MOUSE_JMP = $fe80 +SlowMouse = $fe83 +UpdateMouse = $fe86 +SetMouse = $fe89 ;for C128 -;MOUSE_JMP_128 = $fd00 -SlowMouse_128 = $fd03 -UpdateMouse_128 = $fd06 -SetMouse_128 = $fd09 +;MOUSE_JMP_128 = $fd00 +SlowMouse_128 = $fd03 +UpdateMouse_128 = $fd06 +SetMouse_128 = $fd09 diff --git a/libsrc/geos-cbm/jumptab.inc b/libsrc/geos-cbm/jumptab.inc index 44bc6145a..26788b1a1 100644 --- a/libsrc/geos-cbm/jumptab.inc +++ b/libsrc/geos-cbm/jumptab.inc @@ -1,4 +1,4 @@ - +; ;GEOS System Jump Table ;reassembled by Maciej 'YTM/Alliance' Witkowiak ;4-2-99 diff --git a/libsrc/geos-common/const.inc b/libsrc/geos-common/const.inc index fce3e2839..6aec72c60 100644 --- a/libsrc/geos-common/const.inc +++ b/libsrc/geos-common/const.inc @@ -1,4 +1,4 @@ - +; ;GeosConst - various system constans sorted by function ;reassembled by Maciej 'YTM/Elysium' Witkowiak ;4-2-99, 18-3-99 diff --git a/libsrc/geos-common/geosmac.ca65.inc b/libsrc/geos-common/geosmac.ca65.inc index b932e3cc6..0694d0c7d 100644 --- a/libsrc/geos-common/geosmac.ca65.inc +++ b/libsrc/geos-common/geosmac.ca65.inc @@ -1,4 +1,4 @@ - +; ;GEOS macros ;reassembled for 6502TASM/MMS by Maciej 'YTM/Elysium' Witkowiak ;4-2-99 @@ -6,53 +6,70 @@ ;28-6-99 - ca65 port ;macro 'sub' renamed to 'ssub' due to 65816 mnemonics +;------------------------------------------------------------------------- - .macro LoadB dest, value +.macro LoadB dest, value lda #value sta dest - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro LoadW dest, value +.macro LoadW dest, value LoadB dest+1, >(value) LoadB dest+0, <(value) - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro MoveB source, dest +.macro MoveB source, dest lda source sta dest - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro MoveW source, dest +.macro MoveW source, dest MoveB source+1, dest+1 MoveB source+0, dest+0 - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro add source +.macro add source clc adc source - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro AddB source, dest +.macro AddB source, dest lda source add dest sta dest - .endmacro +.endmacro - .macro AddW source, dest +;------------------------------------------------------------------------- + +.macro AddW source, dest AddB source+0, dest+0 lda source+1 adc dest+1 sta dest+1 - .endmacro +.endmacro - .macro AddVB value, dest +;------------------------------------------------------------------------- + +.macro AddVB value, dest lda dest clc adc #(value) sta dest .endmacro - .macro AddVW value, dest +;------------------------------------------------------------------------- + +.macro AddVW value, dest .local Skip AddVB <(value), dest+0 .if (>(value))=0 @@ -64,27 +81,35 @@ sta dest+1 .endif Skip: - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro ssub source +.macro ssub source sec sbc source - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro SubB source, dest +.macro SubB source, dest lda dest ssub source sta dest - .endmacro +.endmacro - .macro SubW source, dest +;------------------------------------------------------------------------- + +.macro SubW source, dest SubB source+0, dest+0 lda dest+1 sbc source+1 sta dest+1 - .endmacro +.endmacro - .macro SubVW value, dest +;------------------------------------------------------------------------- + +.macro SubVW value, dest sec lda dest+0 sbc #<(value) @@ -92,88 +117,116 @@ Skip: lda dest+1 sbc #>(value) sta dest+1 - .endmacro +.endmacro - .macro CmpB source, dest +;------------------------------------------------------------------------- + +.macro CmpB source, dest lda source cmp dest - .endmacro +.endmacro - .macro CmpBI source, immed +;------------------------------------------------------------------------- + +.macro CmpBI source, immed lda source cmp #(immed) - .endmacro +.endmacro - .macro CmpW source, dest +;------------------------------------------------------------------------- + +.macro CmpW source, dest .local Skip CmpB source+1, dest+1 bne Skip CmpB source+0, dest+0 Skip: - .endmacro +.endmacro - .macro CmpWI source, immed +;------------------------------------------------------------------------- + +.macro CmpWI source, immed .local Skip CmpBI source+1, >(immed) bne Skip CmpBI source+0, <(immed) Skip: - .endmacro +.endmacro - .macro PushB source +;------------------------------------------------------------------------- + +.macro PushB source lda source pha - .endmacro +.endmacro - .macro PushW source +;------------------------------------------------------------------------- + +.macro PushW source PushB source+1 PushB source+0 - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro PopB dest +.macro PopB dest pla sta dest - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro PopW dest +.macro PopW dest PopB dest+0 PopB dest+1 - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro bra addr +.macro bra addr clv bvc addr - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro smb bitNumber, dest +.macro smb bitNumber, dest pha lda #(1 << bitNumber) ora dest sta dest pla - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro smbf bitNumber, dest +.macro smbf bitNumber, dest lda #(1 << bitNumber) ora dest sta dest - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro rmb bitNumber, dest +.macro rmb bitNumber, dest pha lda #(1 << bitNumber) ^ $ff and dest sta dest pla - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro rmbf bitNumber, dest +.macro rmbf bitNumber, dest lda #(1 << bitNumber) ^ $ff and dest sta dest - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro bbs bitNumber, source, addr +.macro bbs bitNumber, source, addr .local Skip php pha @@ -185,9 +238,11 @@ Skip: bra addr Skip: pla plp - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro bbsf bitNumber, source, addr +.macro bbsf bitNumber, source, addr .if bitNumber=7 bit source bmi addr @@ -201,9 +256,11 @@ Skip: pla bne addr .endif .endif - .endmacro +.endmacro - .macro bbr bitNumber, source, addr +;------------------------------------------------------------------------- + +.macro bbr bitNumber, source, addr .local Skip php pha @@ -215,9 +272,11 @@ Skip: pla bra addr Skip: pla plp - .endmacro +.endmacro - .macro bbrf bitNumber, source, addr +;------------------------------------------------------------------------- + +.macro bbrf bitNumber, source, addr .if bitNumber=7 bit source bpl addr @@ -231,26 +290,38 @@ Skip: pla beq addr .endif .endif - .endmacro +.endmacro + +;------------------------------------------------------------------------- ;03.03.99 by Maciej Witkowiak - .macro addv value +;------------------------------------------------------------------------- + +.macro addv value clc adc #(value) - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro subv value +.macro subv value sec sbc #(value) - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro bnex addr +.macro bnex addr txa bne addr - .endmacro +.endmacro + +;------------------------------------------------------------------------- - .macro beqx addr +.macro beqx addr txa beq addr - .endmacro +.endmacro + +;------------------------------------------------------------------------- -- 2.39.5