mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-01-26 23:34:42 +00:00
Expand all tabs in assembly files to spaces.
This allows the code to be displayed properly on GitHub and in modern text editors, which typically do not support the irregularly-spaced tab stops used for ORCA/M code. It also avoids any possibility of problems building the code if the SysTabs file is missing or has been customized with non-standard tab stops.
This commit is contained in:
parent
bd110d7e21
commit
5b26b8cc5b
2
CGC.asm
2
CGC.asm
@ -1,4 +1,4 @@
|
||||
mcopy cgc.macros
|
||||
mcopy cgc.macros
|
||||
****************************************************************
|
||||
*
|
||||
* CnvSX - Convert floating point to SANE extended
|
||||
|
34
ObjOut.asm
34
ObjOut.asm
@ -151,12 +151,12 @@ OutByte private CodeGen
|
||||
adc segDisp+2
|
||||
and #$FFFE
|
||||
beq lb2
|
||||
phx PurgeObjBuffer;
|
||||
jsl PurgeObjBuffer
|
||||
plx
|
||||
lda objLen check for segment overflow
|
||||
clc
|
||||
adc segDisp
|
||||
phx PurgeObjBuffer;
|
||||
jsl PurgeObjBuffer
|
||||
plx
|
||||
lda objLen check for segment overflow
|
||||
clc
|
||||
adc segDisp
|
||||
lda objLen+2
|
||||
adc segDisp+2
|
||||
and #$FFFE
|
||||
@ -177,19 +177,19 @@ lb2 anop carry must be clear
|
||||
long M
|
||||
inc4 segDisp segDisp := segDisp+1;
|
||||
|
||||
pld
|
||||
pld
|
||||
tsc
|
||||
clc
|
||||
adc #4
|
||||
tcs
|
||||
rts
|
||||
|
||||
lb2a lda #$8000 handle a segment overflow
|
||||
lb2a lda #$8000 handle a segment overflow
|
||||
sta segDisp
|
||||
stz segDisp+2
|
||||
ph2 #112
|
||||
jsl Error
|
||||
rts
|
||||
rts
|
||||
end
|
||||
|
||||
****************************************************************
|
||||
@ -210,12 +210,12 @@ OutWord private CodeGen
|
||||
adc segDisp+2
|
||||
and #$FFFE
|
||||
beq lb2
|
||||
phx PurgeObjBuffer;
|
||||
jsl PurgeObjBuffer
|
||||
plx
|
||||
lda objLen check for segment overflow
|
||||
sec
|
||||
adc segDisp
|
||||
phx PurgeObjBuffer;
|
||||
jsl PurgeObjBuffer
|
||||
plx
|
||||
lda objLen check for segment overflow
|
||||
sec
|
||||
adc segDisp
|
||||
lda objLen+2
|
||||
adc segDisp+2
|
||||
and #$FFFE
|
||||
@ -244,7 +244,7 @@ lb2 anop carry must be clear
|
||||
lb3 ph2 #112 flag segment overflow error
|
||||
jsl Error
|
||||
lda #$8000
|
||||
sta segDisp
|
||||
sta segDisp
|
||||
stz segDisp+2
|
||||
rts
|
||||
rts
|
||||
end
|
||||
|
46
ObjOut2.asm
46
ObjOut2.asm
@ -143,20 +143,20 @@ Out start
|
||||
****************************************************************
|
||||
*
|
||||
OutByte private
|
||||
buffSize equ 16384 buffer size
|
||||
buffSize equ 16384 buffer size
|
||||
|
||||
lda objLen if objLen+segDisp+1 = buffSize then
|
||||
sec
|
||||
adc segDisp
|
||||
cmp #buffSize
|
||||
cmp #buffSize
|
||||
blt lb2
|
||||
phx PurgeObjBuffer;
|
||||
jsl PurgeObjBuffer
|
||||
plx
|
||||
lda objLen check for segment overflow
|
||||
sec
|
||||
adc segDisp
|
||||
cmp #buffSize
|
||||
phx PurgeObjBuffer;
|
||||
jsl PurgeObjBuffer
|
||||
plx
|
||||
lda objLen check for segment overflow
|
||||
sec
|
||||
adc segDisp
|
||||
cmp #buffSize
|
||||
bge lb2a
|
||||
lb2 ph4 objPtr p := pointer(ord4(objPtr)+segDisp);
|
||||
tsc p^ := b;
|
||||
@ -169,18 +169,18 @@ lb2 ph4 objPtr p := pointer(ord4(objPtr)+segDisp);
|
||||
long M
|
||||
inc segDisp segDisp := segDisp+1;
|
||||
|
||||
pld
|
||||
pld
|
||||
tsc
|
||||
clc
|
||||
adc #4
|
||||
tcs
|
||||
rts
|
||||
|
||||
lb2a lda #$1000 handle a segment buffer overflow
|
||||
lb2a lda #$1000 handle a segment buffer overflow
|
||||
sta segDisp
|
||||
ph2 #112
|
||||
jsl Error
|
||||
rts
|
||||
rts
|
||||
end
|
||||
|
||||
****************************************************************
|
||||
@ -193,20 +193,20 @@ lb2a lda #$1000 handle a segment buffer overflow
|
||||
****************************************************************
|
||||
*
|
||||
OutWord private
|
||||
buffSize equ 16384 buffer size
|
||||
buffSize equ 16384 buffer size
|
||||
|
||||
lda objLen if objLen+segDisp+2 = buffSize then
|
||||
sec
|
||||
adc segDisp
|
||||
cmp #buffSize-1
|
||||
cmp #buffSize-1
|
||||
blt lb2
|
||||
phx PurgeObjBuffer;
|
||||
jsl PurgeObjBuffer
|
||||
plx
|
||||
lda objLen check for segment overflow
|
||||
sec
|
||||
adc segDisp
|
||||
cmp #buffSize-1
|
||||
phx PurgeObjBuffer;
|
||||
jsl PurgeObjBuffer
|
||||
plx
|
||||
lda objLen check for segment overflow
|
||||
sec
|
||||
adc segDisp
|
||||
cmp #buffSize-1
|
||||
bge lb3
|
||||
lb2 ph4 objPtr p := pointer(ord4(objPtr)+segDisp);
|
||||
tsc p^ := b;
|
||||
@ -229,6 +229,6 @@ lb2 ph4 objPtr p := pointer(ord4(objPtr)+segDisp);
|
||||
lb3 ph2 #112 flag segment overflow error
|
||||
jsl Error
|
||||
lda #$1000
|
||||
sta segDisp
|
||||
rts
|
||||
sta segDisp
|
||||
rts
|
||||
end
|
||||
|
104
Scanner.asm
104
Scanner.asm
@ -66,30 +66,30 @@ lb2 iny next character
|
||||
*
|
||||
KeyPress start
|
||||
|
||||
KeyPressGS kpRec
|
||||
lda kpAvailable
|
||||
beq rts
|
||||
ReadKeyGS rkRec
|
||||
lda rkKey
|
||||
cmp #'.'
|
||||
bne lb1
|
||||
lda rkModifiers
|
||||
and #$0100
|
||||
beq lb1
|
||||
KeyPressGS kpRec
|
||||
lda kpAvailable
|
||||
beq rts
|
||||
ReadKeyGS rkRec
|
||||
lda rkKey
|
||||
cmp #'.'
|
||||
bne lb1
|
||||
lda rkModifiers
|
||||
and #$0100
|
||||
beq lb1
|
||||
ph2 #4
|
||||
jsl TermError
|
||||
|
||||
lb1 lda #1
|
||||
rts rtl
|
||||
lb1 lda #1
|
||||
rts rtl
|
||||
|
||||
kpRec dc i'3'
|
||||
kpKey ds 2
|
||||
kpModifiers ds 2
|
||||
kpAvailable ds 2
|
||||
kpRec dc i'3'
|
||||
kpKey ds 2
|
||||
kpModifiers ds 2
|
||||
kpAvailable ds 2
|
||||
|
||||
rkRec dc i'2'
|
||||
rkKey ds 2
|
||||
rkModifiers ds 2
|
||||
rkRec dc i'2'
|
||||
rkKey ds 2
|
||||
rkModifiers ds 2
|
||||
end
|
||||
|
||||
****************************************************************
|
||||
@ -103,15 +103,15 @@ rkModifiers ds 2
|
||||
*
|
||||
NextCh start scanner
|
||||
eofChar equ 0 end of file character
|
||||
eolChar equ 13 end of line character
|
||||
eolChar equ 13 end of line character
|
||||
|
||||
stackFrameSize equ 14 size of the work space
|
||||
maxPath equ 255 max length of a path name
|
||||
maxPath equ 255 max length of a path name
|
||||
|
||||
fp equ 1 file record pointer; work pointer
|
||||
p1 equ 5 work pointer
|
||||
p2 equ 9
|
||||
cch equ 13
|
||||
cch equ 13
|
||||
|
||||
enum (illegal,ch_special,ch_dash,ch_plus,ch_lt,ch_gt,ch_eq,ch_exc),0
|
||||
enum (ch_and,ch_bar,ch_dot,ch_white,ch_eol,ch_eof,ch_char,ch_string)
|
||||
@ -158,16 +158,16 @@ la2 anop
|
||||
! ch := chr(eolChar);
|
||||
! goto le2;
|
||||
! end; {if}
|
||||
lda lastWasReturn
|
||||
bne la3
|
||||
lda #1
|
||||
sta lastWasReturn
|
||||
lda lastWasReturn
|
||||
bne la3
|
||||
lda #1
|
||||
sta lastWasReturn
|
||||
sta needWriteLine
|
||||
lda #eolChar
|
||||
sta ch
|
||||
brl le2
|
||||
lda #eolChar
|
||||
sta ch
|
||||
brl le2
|
||||
! ch := chr(eofChar);
|
||||
la3 stz ch
|
||||
la3 stz ch
|
||||
|
||||
! if needWriteLine then begin {do eol processing}
|
||||
! WriteLine;
|
||||
@ -195,8 +195,8 @@ lb3 anop
|
||||
! {purge the current source file}
|
||||
! with ffDCBGS do begin
|
||||
! pCount := 5;
|
||||
lda #5
|
||||
sta ffDCBGS
|
||||
lda #5
|
||||
sta ffDCBGS
|
||||
! action := 7;
|
||||
lda #7
|
||||
sta ffDCBGS+2
|
||||
@ -257,7 +257,7 @@ lb4 lda [p1],Y
|
||||
ph4 fp
|
||||
jsl ~Dispose
|
||||
! includeCount := includeCount + 1;
|
||||
inc includeCount
|
||||
inc includeCount
|
||||
! goto 1;
|
||||
brl lab1
|
||||
! end; {if}
|
||||
@ -345,15 +345,15 @@ lc1 move4 chPtr,p1
|
||||
lda [p1]
|
||||
and #$00FF
|
||||
cmp #'*'
|
||||
beq lc1a
|
||||
cmp #'/'
|
||||
beq lc1a
|
||||
cmp #'/'
|
||||
jne lc6
|
||||
ldx allowSlashSlashComments
|
||||
jeq lc6
|
||||
ldx allowSlashSlashComments
|
||||
jeq lc6
|
||||
! cch := chr(chPtr^);
|
||||
lc1a sta cch
|
||||
lc1a sta cch
|
||||
! chPtr := pointer(ord4(chPtr)+1); {skip the '*' or '/'}
|
||||
inc4 chPtr
|
||||
inc4 chPtr
|
||||
! done := false;
|
||||
! repeat
|
||||
lc2 anop
|
||||
@ -366,23 +366,23 @@ lc2 anop
|
||||
cmp eofPtr+2
|
||||
jeq lc5
|
||||
! else if (cch = '/') and (chPtr^ = return) then begin
|
||||
lc2a lda cch
|
||||
cmp #'/'
|
||||
bne lc2b
|
||||
lc2a lda cch
|
||||
cmp #'/'
|
||||
bne lc2b
|
||||
! if charKinds[ord(ch)] = ch_eol then
|
||||
! done := true
|
||||
! else
|
||||
! chPtr := pointer(ord4(chPtr)+1);
|
||||
move4 chPtr,p1
|
||||
lda [p1]
|
||||
and #$00FF
|
||||
move4 chPtr,p1
|
||||
lda [p1]
|
||||
and #$00FF
|
||||
asl A
|
||||
tax
|
||||
lda charKinds,X
|
||||
cmp #ch_eol
|
||||
jeq lc5
|
||||
inc4 chPtr
|
||||
bra lc2
|
||||
tax
|
||||
lda charKinds,X
|
||||
cmp #ch_eol
|
||||
jeq lc5
|
||||
inc4 chPtr
|
||||
bra lc2
|
||||
! end {else if}
|
||||
! else begin
|
||||
! ch := chr(chPtr^); {check for terminating */}
|
||||
@ -551,7 +551,7 @@ db1 sta p1
|
||||
stx p1+2
|
||||
lda [p1]
|
||||
and #$00FF
|
||||
cmp #$07
|
||||
cmp #$07
|
||||
bne db2
|
||||
! debugType := break
|
||||
lda #break
|
||||
|
Loading…
x
Reference in New Issue
Block a user