1
0
mirror of https://github.com/cc65/cc65.git synced 2024-09-30 08:57:49 +00:00

Normalized coding style.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5499 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
ol.sc 2012-02-08 16:13:01 +00:00
parent 9aac71b74a
commit 00ddcaeb93
39 changed files with 195 additions and 244 deletions

View File

@ -5,14 +5,14 @@
#--------------------------------------------------------------------------
# Object files
S_OBJS += crc.o \
doublepop.o \
clearram.o \
fillram.o \
initram.o \
movedata.o \
doublespop.o \
copystring.o \
S_OBJS += clearram.o \
cmpfstring.o \
cmpstring.o \
copyfstring.o \
cmpfstring.o
copystring.o \
crc.o \
doublepop.o \
doublespop.o \
fillram.o \
initram.o \
movedata.o

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Elysium' Witkowiak
;
@ -13,13 +12,13 @@
.include "geossym.inc"
_ClearRam:
jsr DoublePop
pha
txa
pha
jsr ClearRam
pla
tax
pla
rts
jsr DoublePop
pha
txa
pha
jsr ClearRam
pla
tax
pla
rts

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Elysium' Witkowiak
;
@ -13,10 +12,10 @@
.include "jumptab.inc"
_CmpFString:
jsr DoubleSPop
jsr popa
jsr SetPtrXY
jsr CmpFString
bne L1
jmp return0
L1: jmp return1
jsr DoubleSPop
jsr popa
jsr SetPtrXY
jsr CmpFString
bne L1
jmp return0
L1: jmp return1

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Elysium' Witkowiak
;
@ -13,8 +12,8 @@
.include "jumptab.inc"
_CmpString:
jsr DoubleSPop
jsr CmpString
bne L1
jmp return0
L1: jmp return1
jsr DoubleSPop
jsr CmpString
bne L1
jmp return0
L1: jmp return1

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Elysium' Witkowiak
;
@ -13,7 +12,7 @@
.include "jumptab.inc"
_CopyFString:
jsr DoubleSPop
jsr popa
jsr SetPtrXY
jmp CopyFString
jsr DoubleSPop
jsr popa
jsr SetPtrXY
jmp CopyFString

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
@ -12,5 +11,5 @@
.include "jumptab.inc"
_CopyString:
jsr DoubleSPop
jmp CopyString
jsr DoubleSPop
jmp CopyString

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
@ -13,9 +12,9 @@
.include "geossym.inc"
_CRC:
jsr DoublePop
jsr CRC
lda r2L
ldx r2H
rts
jsr DoublePop
jsr CRC
lda r2L
ldx r2H
rts

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
@ -10,9 +9,9 @@
.include "geossym.inc"
DoublePop:
sta r0L
stx r0H
jsr popax
sta r1L
stx r1H
rts
sta r0L
stx r0H
jsr popax
sta r1L
stx r1H
rts

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Elysium' Witkowiak
;
@ -12,17 +11,17 @@
.include "geossym.inc"
DoubleSPop:
sta ptr4
stx ptr4+1
jsr popax
sta ptr3
stx ptr3+1
; rts
sta ptr4
stx ptr4+1
jsr popax
sta ptr3
stx ptr3+1
; rts
;
; SetPtrXY can be sometimes executed twice, but even this way it is few cycles
; faster...
SetPtrXY:
ldx #ptr4
ldy #ptr3
rts
ldx #ptr4
ldy #ptr3
rts

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Elysium' Witkowiak
;
@ -13,18 +12,18 @@
.include "geossym.inc"
_FillRam:
sta r0L
stx r0H
jsr popa
sta r2L
jsr popax
sta r1L
stx r1H
pha
txa
pha
jsr FillRam
pla
tax
pla
rts
sta r0L
stx r0H
jsr popa
sta r2L
jsr popax
sta r1L
stx r1H
pha
txa
pha
jsr FillRam
pla
tax
pla
rts

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
@ -12,6 +11,6 @@
.include "geossym.inc"
_InitRam:
sta r0L
stx r0H
jmp InitRam
sta r0L
stx r0H
jmp InitRam

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Elysium' Witkowiak
;
@ -13,15 +12,15 @@
.include "geossym.inc"
_MoveData:
sta r2L
stx r2H
jsr popax
sta r0L
stx r0H
jsr popax
sta r1L
stx r1H
jsr MoveData
lda r1L ; return dest ptr to be compatible with memmove and memcpy
ldx r1H
rts
sta r2L
stx r2H
jsr popax
sta r0L
stx r0H
jsr popax
sta r1L
stx r1H
jsr MoveData
lda r1L ; return dest ptr to be compatible with memmove and memcpy
ldx r1H
rts

View File

@ -5,10 +5,10 @@
#--------------------------------------------------------------------------
# Object files
S_OBJS += domenu.o \
S_OBJS += doicons.o \
domenu.o \
dopreviousmenu.o \
redomenu.o \
recovermenu.o \
recoverallmenus.o \
gotofirstmenu.o \
doicons.o
recoverallmenus.o \
recovermenu.o \
redomenu.o

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
@ -12,6 +11,6 @@
.include "geossym.inc"
_DoIcons:
sta r0L
stx r0H
jmp DoIcons
sta r0L
stx r0H
jmp DoIcons

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
@ -12,7 +11,7 @@
.include "geossym.inc"
_DoMenu:
sta r0L
stx r0H
lda #0
jmp DoMenu
sta r0L
stx r0H
lda #0
jmp DoMenu

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
@ -10,4 +9,4 @@
.include "jumptab.inc"
_DoPreviousMenu = DoPreviousMenu
_DoPreviousMenu = DoPreviousMenu

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
@ -10,4 +9,4 @@
.include "jumptab.inc"
_GotoFirstMenu = GotoFirstMenu
_GotoFirstMenu = GotoFirstMenu

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
@ -10,4 +9,4 @@
.include "jumptab.inc"
_RecoverMenu = RecoverMenu
_RecoverMenu = RecoverMenu

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
@ -10,4 +9,4 @@
.include "jumptab.inc"
_ReDoMenu = ReDoMenu
_ReDoMenu = ReDoMenu

View File

@ -5,16 +5,16 @@
#--------------------------------------------------------------------------
# Object files
S_OBJS += startmousemode.o \
clearmousemode.o \
mouseup.o \
mouseoff.o \
drawsprite.o \
possprite.o \
enablsprite.o \
S_OBJS += clearmousemode.o \
disablsprite.o \
ismseinregion.o \
drawsprite.o \
enablsprite.o \
getnextchar.o \
inittextprompt.o \
ismseinregion.o \
mouseoff.o \
mouseup.o \
possprite.o \
promptoff.o \
prompton.o \
getnextchar.o
startmousemode.o

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
@ -10,4 +9,4 @@
.include "jumptab.inc"
_ClearMouseMode = ClearMouseMode
_ClearMouseMode = ClearMouseMode

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
@ -12,5 +11,5 @@
.include "geossym.inc"
_DisablSprite:
sta r3L
jmp DisablSprite
sta r3L
jmp DisablSprite

View File

@ -1,12 +1,9 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
; 30.10.99
;
; void DrawSprite (char spritenum, char *tab63 );
;
.import popa
.export _DrawSprite
@ -15,9 +12,8 @@
.include "geossym.inc"
_DrawSprite:
sta r4L
stx r4H
jsr popa
sta r3L
jmp DrawSprite
sta r4L
stx r4H
jsr popa
sta r3L
jmp DrawSprite

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
@ -12,5 +11,5 @@
.include "geossym.inc"
_EnablSprite:
sta r3L
jmp EnablSprite
sta r3L
jmp EnablSprite

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Elysium' Witkowiak
;
@ -12,7 +11,7 @@
.include "jumptab.inc"
_GetNextChar:
jsr GetNextChar
ldx #0
tay ; preserve Z flag
rts
jsr GetNextChar
ldx #0
tay ; preserve Z flag
rts

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Elysium' Witkowiak
;
@ -7,13 +6,12 @@
; char IsMseInRegion (struct window *mywindow);
.import _InitDrawWindow
.export _IsMseInRegion
.include "jumptab.inc"
_IsMseInRegion:
jsr _InitDrawWindow
jsr IsMseInRegion
ldx #0
rts
jsr _InitDrawWindow
jsr IsMseInRegion
ldx #0
rts

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
@ -10,4 +9,4 @@
.include "jumptab.inc"
_MouseOff = MouseOff
_MouseOff = MouseOff

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
@ -10,4 +9,4 @@
.include "jumptab.inc"
_MouseUp = MouseUp
_MouseUp = MouseUp

View File

@ -1,12 +1,9 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
; 30.10.99
;
; void PosSprite (char spritenum, struct pixel *position );
;
.importzp ptr4
.import popa
@ -16,17 +13,17 @@
.include "geossym.inc"
_PosSprite:
sta ptr4
stx ptr4+1
ldy #0
lda (ptr4),y
sta r4L
iny
lda (ptr4),y
sta r4H
iny
lda (ptr4),y
sta r5L
jsr popa
sta r3L
jmp PosSprite
sta ptr4
stx ptr4+1
ldy #0
lda (ptr4),y
sta r4L
iny
lda (ptr4),y
sta r4H
iny
lda (ptr4),y
sta r5L
jsr popa
sta r3L
jmp PosSprite

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
@ -10,4 +9,4 @@
.include "jumptab.inc"
_PromptOff = PromptOff
_PromptOff = PromptOff

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
@ -13,12 +12,13 @@
.include "geossym.inc"
_PromptOn:
sta ptr4
stx ptr4+1
ldy #0
promptLp: lda (ptr4),y
sta stringX,y
iny
cpy #3
bne promptLp
jmp PromptOn
sta ptr4
stx ptr4+1
ldy #0
promptLp:
lda (ptr4),y
sta stringX,y
iny
cpy #3
bne promptLp
jmp PromptOn

View File

@ -1,4 +1,3 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
@ -11,5 +10,5 @@
.include "jumptab.inc"
_StartMouseMode:
clc
jmp StartMouseMode
clc
jmp StartMouseMode

View File

@ -5,7 +5,7 @@
#--------------------------------------------------------------------------
# Object files
S_OBJS += processinitrestartenable.o \
processblock.o \
S_OBJS += processblock.o \
processfreeze.o \
processinitrestartenable.o \
processsleep.o

View File

@ -1,15 +1,12 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
; 27.10.99
;
; void InitProcesses (char number, struct process* proctab);
; (rest)
; void BlockProcess (char number);
; void UnBlockProcess (char number);
;
.export _BlockProcess
.export _UnBlockProcess
@ -17,9 +14,9 @@
.include "jumptab.inc"
_BlockProcess:
tax
jmp BlockProcess
tax
jmp BlockProcess
_UnBlockProcess:
tax
jmp UnBlockProcess
tax
jmp UnBlockProcess

View File

@ -1,13 +1,10 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
; 27.10.99
;
; void FreezeProcess (char number);
; void UnFreezeProcess (char number);
;
.export _FreezeProcess
.export _UnFreezeProcess
@ -15,9 +12,9 @@
.include "jumptab.inc"
_FreezeProcess:
tax
jmp FreezeProcess
tax
jmp FreezeProcess
_UnFreezeProcess:
tax
jmp UnFreezeProcess
tax
jmp UnFreezeProcess

View File

@ -1,14 +1,11 @@
;
; Maciej 'YTM/Alliance' Witkowiak
;
; 27.10.99
;
; void InitProcesses (char number, struct process* proctab);
; void RestartProcess (char number);
; void EnableProcess (char number);
;
.import popa
.export _InitProcesses
@ -19,16 +16,15 @@
.include "geossym.inc"
_InitProcesses:
sta r0L
stx r0H
jsr popa
jmp InitProcesses
sta r0L
stx r0H
jsr popa
jmp InitProcesses
_RestartProcess:
tax
jmp RestartProcess
tax
jmp RestartProcess
_EnableProcess:
tax
jmp EnableProcess
tax
jmp EnableProcess

View File

@ -1,37 +1,34 @@
;
; Maciej 'YTM/Elysium' Witkowiak
;
; 30.10.99, 15.8.2003
;
; void Sleep (int jiffies);
;
.importzp ptr1
.importzp tmp1
.export _Sleep
.include "jumptab.inc"
.include "geossym.inc"
.importzp ptr1
.importzp tmp1
_SleepExit:
jsr Sleep ; call Sleep
ldx tmp1
txs ; restore stack pointer
jmp (ptr1) ; when timeouts control will reach here
jsr Sleep ; call Sleep
ldx tmp1
txs ; restore stack pointer
jmp (ptr1) ; when timeouts control will reach here
_Sleep:
sta r0L ; store data
stx r0H
pla
sta ptr1
pla
sta ptr1+1 ; preserve return address
inc ptr1
bne @L0
inc ptr1+1 ; fix return address
@L0: tsx
stx tmp1 ; preserve stack pointer
jsr _SleepExit ; call Sleep
jmp MainLoop ; immediate return here - go to idle loop
sta r0L ; store data
stx r0H
pla
sta ptr1
pla
sta ptr1+1 ; preserve return address
inc ptr1
bne @L0
inc ptr1+1 ; fix return address
@L0: tsx
stx tmp1 ; preserve stack pointer
jsr _SleepExit ; call Sleep
jmp MainLoop ; immediate return here - go to idle loop