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
|
* CnvSX - Convert floating point to SANE extended
|
||||||
|
|
34
ObjOut.asm
34
ObjOut.asm
|
@ -151,12 +151,12 @@ OutByte private CodeGen
|
||||||
adc segDisp+2
|
adc segDisp+2
|
||||||
and #$FFFE
|
and #$FFFE
|
||||||
beq lb2
|
beq lb2
|
||||||
phx PurgeObjBuffer;
|
phx PurgeObjBuffer;
|
||||||
jsl PurgeObjBuffer
|
jsl PurgeObjBuffer
|
||||||
plx
|
plx
|
||||||
lda objLen check for segment overflow
|
lda objLen check for segment overflow
|
||||||
clc
|
clc
|
||||||
adc segDisp
|
adc segDisp
|
||||||
lda objLen+2
|
lda objLen+2
|
||||||
adc segDisp+2
|
adc segDisp+2
|
||||||
and #$FFFE
|
and #$FFFE
|
||||||
|
@ -177,19 +177,19 @@ lb2 anop carry must be clear
|
||||||
long M
|
long M
|
||||||
inc4 segDisp segDisp := segDisp+1;
|
inc4 segDisp segDisp := segDisp+1;
|
||||||
|
|
||||||
pld
|
pld
|
||||||
tsc
|
tsc
|
||||||
clc
|
clc
|
||||||
adc #4
|
adc #4
|
||||||
tcs
|
tcs
|
||||||
rts
|
rts
|
||||||
|
|
||||||
lb2a lda #$8000 handle a segment overflow
|
lb2a lda #$8000 handle a segment overflow
|
||||||
sta segDisp
|
sta segDisp
|
||||||
stz segDisp+2
|
stz segDisp+2
|
||||||
ph2 #112
|
ph2 #112
|
||||||
jsl Error
|
jsl Error
|
||||||
rts
|
rts
|
||||||
end
|
end
|
||||||
|
|
||||||
****************************************************************
|
****************************************************************
|
||||||
|
@ -210,12 +210,12 @@ OutWord private CodeGen
|
||||||
adc segDisp+2
|
adc segDisp+2
|
||||||
and #$FFFE
|
and #$FFFE
|
||||||
beq lb2
|
beq lb2
|
||||||
phx PurgeObjBuffer;
|
phx PurgeObjBuffer;
|
||||||
jsl PurgeObjBuffer
|
jsl PurgeObjBuffer
|
||||||
plx
|
plx
|
||||||
lda objLen check for segment overflow
|
lda objLen check for segment overflow
|
||||||
sec
|
sec
|
||||||
adc segDisp
|
adc segDisp
|
||||||
lda objLen+2
|
lda objLen+2
|
||||||
adc segDisp+2
|
adc segDisp+2
|
||||||
and #$FFFE
|
and #$FFFE
|
||||||
|
@ -244,7 +244,7 @@ lb2 anop carry must be clear
|
||||||
lb3 ph2 #112 flag segment overflow error
|
lb3 ph2 #112 flag segment overflow error
|
||||||
jsl Error
|
jsl Error
|
||||||
lda #$8000
|
lda #$8000
|
||||||
sta segDisp
|
sta segDisp
|
||||||
stz segDisp+2
|
stz segDisp+2
|
||||||
rts
|
rts
|
||||||
end
|
end
|
||||||
|
|
46
ObjOut2.asm
46
ObjOut2.asm
|
@ -143,20 +143,20 @@ Out start
|
||||||
****************************************************************
|
****************************************************************
|
||||||
*
|
*
|
||||||
OutByte private
|
OutByte private
|
||||||
buffSize equ 16384 buffer size
|
buffSize equ 16384 buffer size
|
||||||
|
|
||||||
lda objLen if objLen+segDisp+1 = buffSize then
|
lda objLen if objLen+segDisp+1 = buffSize then
|
||||||
sec
|
sec
|
||||||
adc segDisp
|
adc segDisp
|
||||||
cmp #buffSize
|
cmp #buffSize
|
||||||
blt lb2
|
blt lb2
|
||||||
phx PurgeObjBuffer;
|
phx PurgeObjBuffer;
|
||||||
jsl PurgeObjBuffer
|
jsl PurgeObjBuffer
|
||||||
plx
|
plx
|
||||||
lda objLen check for segment overflow
|
lda objLen check for segment overflow
|
||||||
sec
|
sec
|
||||||
adc segDisp
|
adc segDisp
|
||||||
cmp #buffSize
|
cmp #buffSize
|
||||||
bge lb2a
|
bge lb2a
|
||||||
lb2 ph4 objPtr p := pointer(ord4(objPtr)+segDisp);
|
lb2 ph4 objPtr p := pointer(ord4(objPtr)+segDisp);
|
||||||
tsc p^ := b;
|
tsc p^ := b;
|
||||||
|
@ -169,18 +169,18 @@ lb2 ph4 objPtr p := pointer(ord4(objPtr)+segDisp);
|
||||||
long M
|
long M
|
||||||
inc segDisp segDisp := segDisp+1;
|
inc segDisp segDisp := segDisp+1;
|
||||||
|
|
||||||
pld
|
pld
|
||||||
tsc
|
tsc
|
||||||
clc
|
clc
|
||||||
adc #4
|
adc #4
|
||||||
tcs
|
tcs
|
||||||
rts
|
rts
|
||||||
|
|
||||||
lb2a lda #$1000 handle a segment buffer overflow
|
lb2a lda #$1000 handle a segment buffer overflow
|
||||||
sta segDisp
|
sta segDisp
|
||||||
ph2 #112
|
ph2 #112
|
||||||
jsl Error
|
jsl Error
|
||||||
rts
|
rts
|
||||||
end
|
end
|
||||||
|
|
||||||
****************************************************************
|
****************************************************************
|
||||||
|
@ -193,20 +193,20 @@ lb2a lda #$1000 handle a segment buffer overflow
|
||||||
****************************************************************
|
****************************************************************
|
||||||
*
|
*
|
||||||
OutWord private
|
OutWord private
|
||||||
buffSize equ 16384 buffer size
|
buffSize equ 16384 buffer size
|
||||||
|
|
||||||
lda objLen if objLen+segDisp+2 = buffSize then
|
lda objLen if objLen+segDisp+2 = buffSize then
|
||||||
sec
|
sec
|
||||||
adc segDisp
|
adc segDisp
|
||||||
cmp #buffSize-1
|
cmp #buffSize-1
|
||||||
blt lb2
|
blt lb2
|
||||||
phx PurgeObjBuffer;
|
phx PurgeObjBuffer;
|
||||||
jsl PurgeObjBuffer
|
jsl PurgeObjBuffer
|
||||||
plx
|
plx
|
||||||
lda objLen check for segment overflow
|
lda objLen check for segment overflow
|
||||||
sec
|
sec
|
||||||
adc segDisp
|
adc segDisp
|
||||||
cmp #buffSize-1
|
cmp #buffSize-1
|
||||||
bge lb3
|
bge lb3
|
||||||
lb2 ph4 objPtr p := pointer(ord4(objPtr)+segDisp);
|
lb2 ph4 objPtr p := pointer(ord4(objPtr)+segDisp);
|
||||||
tsc p^ := b;
|
tsc p^ := b;
|
||||||
|
@ -229,6 +229,6 @@ lb2 ph4 objPtr p := pointer(ord4(objPtr)+segDisp);
|
||||||
lb3 ph2 #112 flag segment overflow error
|
lb3 ph2 #112 flag segment overflow error
|
||||||
jsl Error
|
jsl Error
|
||||||
lda #$1000
|
lda #$1000
|
||||||
sta segDisp
|
sta segDisp
|
||||||
rts
|
rts
|
||||||
end
|
end
|
||||||
|
|
104
Scanner.asm
104
Scanner.asm
|
@ -66,30 +66,30 @@ lb2 iny next character
|
||||||
*
|
*
|
||||||
KeyPress start
|
KeyPress start
|
||||||
|
|
||||||
KeyPressGS kpRec
|
KeyPressGS kpRec
|
||||||
lda kpAvailable
|
lda kpAvailable
|
||||||
beq rts
|
beq rts
|
||||||
ReadKeyGS rkRec
|
ReadKeyGS rkRec
|
||||||
lda rkKey
|
lda rkKey
|
||||||
cmp #'.'
|
cmp #'.'
|
||||||
bne lb1
|
bne lb1
|
||||||
lda rkModifiers
|
lda rkModifiers
|
||||||
and #$0100
|
and #$0100
|
||||||
beq lb1
|
beq lb1
|
||||||
ph2 #4
|
ph2 #4
|
||||||
jsl TermError
|
jsl TermError
|
||||||
|
|
||||||
lb1 lda #1
|
lb1 lda #1
|
||||||
rts rtl
|
rts rtl
|
||||||
|
|
||||||
kpRec dc i'3'
|
kpRec dc i'3'
|
||||||
kpKey ds 2
|
kpKey ds 2
|
||||||
kpModifiers ds 2
|
kpModifiers ds 2
|
||||||
kpAvailable ds 2
|
kpAvailable ds 2
|
||||||
|
|
||||||
rkRec dc i'2'
|
rkRec dc i'2'
|
||||||
rkKey ds 2
|
rkKey ds 2
|
||||||
rkModifiers ds 2
|
rkModifiers ds 2
|
||||||
end
|
end
|
||||||
|
|
||||||
****************************************************************
|
****************************************************************
|
||||||
|
@ -103,15 +103,15 @@ rkModifiers ds 2
|
||||||
*
|
*
|
||||||
NextCh start scanner
|
NextCh start scanner
|
||||||
eofChar equ 0 end of file character
|
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
|
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
|
fp equ 1 file record pointer; work pointer
|
||||||
p1 equ 5 work pointer
|
p1 equ 5 work pointer
|
||||||
p2 equ 9
|
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 (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)
|
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);
|
! ch := chr(eolChar);
|
||||||
! goto le2;
|
! goto le2;
|
||||||
! end; {if}
|
! end; {if}
|
||||||
lda lastWasReturn
|
lda lastWasReturn
|
||||||
bne la3
|
bne la3
|
||||||
lda #1
|
lda #1
|
||||||
sta lastWasReturn
|
sta lastWasReturn
|
||||||
sta needWriteLine
|
sta needWriteLine
|
||||||
lda #eolChar
|
lda #eolChar
|
||||||
sta ch
|
sta ch
|
||||||
brl le2
|
brl le2
|
||||||
! ch := chr(eofChar);
|
! ch := chr(eofChar);
|
||||||
la3 stz ch
|
la3 stz ch
|
||||||
|
|
||||||
! if needWriteLine then begin {do eol processing}
|
! if needWriteLine then begin {do eol processing}
|
||||||
! WriteLine;
|
! WriteLine;
|
||||||
|
@ -195,8 +195,8 @@ lb3 anop
|
||||||
! {purge the current source file}
|
! {purge the current source file}
|
||||||
! with ffDCBGS do begin
|
! with ffDCBGS do begin
|
||||||
! pCount := 5;
|
! pCount := 5;
|
||||||
lda #5
|
lda #5
|
||||||
sta ffDCBGS
|
sta ffDCBGS
|
||||||
! action := 7;
|
! action := 7;
|
||||||
lda #7
|
lda #7
|
||||||
sta ffDCBGS+2
|
sta ffDCBGS+2
|
||||||
|
@ -257,7 +257,7 @@ lb4 lda [p1],Y
|
||||||
ph4 fp
|
ph4 fp
|
||||||
jsl ~Dispose
|
jsl ~Dispose
|
||||||
! includeCount := includeCount + 1;
|
! includeCount := includeCount + 1;
|
||||||
inc includeCount
|
inc includeCount
|
||||||
! goto 1;
|
! goto 1;
|
||||||
brl lab1
|
brl lab1
|
||||||
! end; {if}
|
! end; {if}
|
||||||
|
@ -345,15 +345,15 @@ lc1 move4 chPtr,p1
|
||||||
lda [p1]
|
lda [p1]
|
||||||
and #$00FF
|
and #$00FF
|
||||||
cmp #'*'
|
cmp #'*'
|
||||||
beq lc1a
|
beq lc1a
|
||||||
cmp #'/'
|
cmp #'/'
|
||||||
jne lc6
|
jne lc6
|
||||||
ldx allowSlashSlashComments
|
ldx allowSlashSlashComments
|
||||||
jeq lc6
|
jeq lc6
|
||||||
! cch := chr(chPtr^);
|
! cch := chr(chPtr^);
|
||||||
lc1a sta cch
|
lc1a sta cch
|
||||||
! chPtr := pointer(ord4(chPtr)+1); {skip the '*' or '/'}
|
! chPtr := pointer(ord4(chPtr)+1); {skip the '*' or '/'}
|
||||||
inc4 chPtr
|
inc4 chPtr
|
||||||
! done := false;
|
! done := false;
|
||||||
! repeat
|
! repeat
|
||||||
lc2 anop
|
lc2 anop
|
||||||
|
@ -366,23 +366,23 @@ lc2 anop
|
||||||
cmp eofPtr+2
|
cmp eofPtr+2
|
||||||
jeq lc5
|
jeq lc5
|
||||||
! else if (cch = '/') and (chPtr^ = return) then begin
|
! else if (cch = '/') and (chPtr^ = return) then begin
|
||||||
lc2a lda cch
|
lc2a lda cch
|
||||||
cmp #'/'
|
cmp #'/'
|
||||||
bne lc2b
|
bne lc2b
|
||||||
! if charKinds[ord(ch)] = ch_eol then
|
! if charKinds[ord(ch)] = ch_eol then
|
||||||
! done := true
|
! done := true
|
||||||
! else
|
! else
|
||||||
! chPtr := pointer(ord4(chPtr)+1);
|
! chPtr := pointer(ord4(chPtr)+1);
|
||||||
move4 chPtr,p1
|
move4 chPtr,p1
|
||||||
lda [p1]
|
lda [p1]
|
||||||
and #$00FF
|
and #$00FF
|
||||||
asl A
|
asl A
|
||||||
tax
|
tax
|
||||||
lda charKinds,X
|
lda charKinds,X
|
||||||
cmp #ch_eol
|
cmp #ch_eol
|
||||||
jeq lc5
|
jeq lc5
|
||||||
inc4 chPtr
|
inc4 chPtr
|
||||||
bra lc2
|
bra lc2
|
||||||
! end {else if}
|
! end {else if}
|
||||||
! else begin
|
! else begin
|
||||||
! ch := chr(chPtr^); {check for terminating */}
|
! ch := chr(chPtr^); {check for terminating */}
|
||||||
|
@ -551,7 +551,7 @@ db1 sta p1
|
||||||
stx p1+2
|
stx p1+2
|
||||||
lda [p1]
|
lda [p1]
|
||||||
and #$00FF
|
and #$00FF
|
||||||
cmp #$07
|
cmp #$07
|
||||||
bne db2
|
bne db2
|
||||||
! debugType := break
|
! debugType := break
|
||||||
lda #break
|
lda #break
|
||||||
|
|
Loading…
Reference in New Issue