From e160551f0f5a627df30adc6ded52a10afd5ef00a Mon Sep 17 00:00:00 2001 From: Taka Date: Sat, 25 Jun 2022 07:41:10 +1000 Subject: [PATCH] Left-align stand-alone assembly comments with the code. --- LST2.bas | 22 ++++++++++++++-------- LST2.ssd | Bin 15360 -> 15360 bytes 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/LST2.bas b/LST2.bas index 8e24cb3..044bb1c 100644 --- a/LST2.bas +++ b/LST2.bas @@ -3,7 +3,7 @@ 12REM out onto separate lines. 13REM Since it calls into the BASIC ROM, it requires BASIC 2. 14 -20REM It lives at &08C0-0AFF, which is normally used for the following: +20REM It lives at &08D0-0AFF, which is normally used for the following: 21REM 800-8FF: sound workspace & buffers, printer buffer, envelope storage 22REM 900-9FF: envelope storage, RS423/speech/cassette output buffers 23REM A00-AFF: cassette/RS423 input buffers @@ -31,7 +31,9 @@ 120REM This points into the program code being listed (only while 121REM we're parsing the input command). 122pcode = &3B : REM and &3C -123 +123REM After parsing the input command, we use these bytes as temp storage. +124temp1 = &3B : temp2 = &3C +125 130REM This holds the current line# being listed. 131curr_lineno = &2A : REM and &2B 132 @@ -61,7 +63,7 @@ 900osbyte = &FFF4 : oswrch = &FFEE : osnewl = &FFE7 910 1000FOR opt = 0 TO 3 STEP 3 -1010BASE = &08C0 : P% = BASE +1010BASE = &08D0 : P% = BASE 1020[ OPT opt 1030 1100\ === MAIN ENTRY POINT ==================================================== @@ -376,7 +378,8 @@ 6610 6620\ if we haven't indented yet, and we have a ".", then flag that we are 6621\ in an assembly label -6630BIT indent_pending +6630LDY indent_pending \ remember this flag +6631STY temp2 6640BPL P%+10 6650CMP #&2E 6660BNE P%+6 @@ -401,11 +404,14 @@ 6840JSR indent 6850 6860.postAsmPrefix -6870\ if we have a "\" (start of comment), then indent to col.50 +6870\ if we have a "\" (start of comment), and it's not stand-alone, +6871\ then show it at col.50 6880CMP #&5C -6890BNE P%+7 -6900LDX #50 -6910JSR indent +6890BNE P%+11 +6891BIT temp2 +6892BMI P%+7 +6894LDX #50 +6895JSR indent 6920 6930\ if we have a "]" (end of assembly code), then flag that we are in BASIC code 6940CMP #&5D diff --git a/LST2.ssd b/LST2.ssd index 7a5dd14ecf332fe5e626cff267c7974e19dbdbbb..39e1695fde1a87a21a6a8cec19e12d5826c69e78 100644 GIT binary patch delta 940 zcmX|8O-$Qn82;jfHt{e^r-C4A*S8G=MncHXQu0@+g!DjbI@DHb(U@2uA7CliQDOv@ zI)%gRR-KTl`a};EikeE`j3dXD-ya_gi?1mGO>gpv?zgo6!lgd<;9BS$Y= zvHWfJ`bQ(}Z9|ig%L}4x)`XeGe4ZlC3LwHh480bdnb4C z>J{jTMuVa1!;iNtPfqXKhX(l61PEdVD@^66m=VM|0GNb4U7!ooG>e_AXl?VYE$m=-f2$h`#+B^eh&cOadWMC#>Sznz#gM--tjFD;=6(lX3Q zSzp-Cxn8x7jE#f4Cp^Nr_PFHb3o!nPClKIVzjMjaYt1g4>yOst*r*v9;#>zG@TnW% zHk04BnX5F$u1YZDWKI7rkS@^5)O+mv}T zQ6g#|GK8cH^8ZW({py&hXD=LxC2TxFPwebvfTj`9a}kbYVx8}D^zP3syuS=?fE z-FN}`^VZJmtH$T>GrP`g#3S4NcQ)cqEB~Wo+v9YuTQ}mJG_J(&F*^y~>J<1@z&|p`MRxF_mnzX6%)vWxU-9%gimE+2#azf$ZTVxFJEbP`1Djw7Hqbd8a zb$M{x<8KG|S_R;sULtBh4XU3#Q^S58_58cLIH?2Mz^OI9=+Ms?_HuBvt^_M*x&wY& zcM#`RSUqMqQC(_*$805rb@+-l9O+2yvHJU32Oi}+}LM@N5+@xP7aj(^8*Bp!voNoZ@4(t5T~pCnCA{+cc+xF(IP?zHR7#DN(jKc~sj?wpXE zknKWJ)Wjhc#DFjmEP)8|Vy;AQL}Vz)&J;Z8ornn1t_)VK!dv%Ea?9mAC=Fi<-8BkYPB;=2%VuhT{wA4CJ%%B$J0ck7IE`Ccrw&G2@7Q+ZBT% zyS@$y26AjV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