From ab8bcb9b4082ce486ed9cdd548d8a88b5715ccba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20GIBERT?= Date: Thu, 1 Feb 2018 07:16:35 +0000 Subject: [PATCH] Kernel 0.9.1 : ASM ... more directives --- .Floppies/A2OSX.BUILD.po | Bin 819200 -> 819200 bytes BIN/ASM.S.DIR.txt | 59 +++++++++++++++++++++++++++++++++------ BIN/ASM.S.txt | 2 +- TEST.S.txt | 14 +++++----- 4 files changed, 58 insertions(+), 17 deletions(-) diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index a8bddfa770746cb8f8588b15388ce66f2337a841..6f8c823ada4b2356dbcb24b5d467f980c9b87cb1 100644 GIT binary patch delta 7953 zcmZu#3tUun_WxZjS1vOQ@){W4mzm*>SD3jbK2i};&;drk6t!Z+Q7}*fGE8k|e812! zHm|X06Qwm4Hs~g{>DJoc6ib~R+k+m9wYAj0jB5Maw%htYzx%tx%N0M|x#yhU_nh-R z=lp)Z!EQI$?FP^5{(e!Br!V?n@S`G6?+W;V6Y%sPNT!yoTj}4W=1>+?nD?E~;(Z*?GwD)Rjv{$v?X%lscx+I-Wm#jU3Lm*Z%9zpl(o?rZ3bl(KqQI(sz{UkLq3ePW?0bU<0jZ^(uXsK1v^_|2TQ%&!@@% zNDfX3PC>{O(*6Emv772V#i8?^o8Z?T7j>|Y3rX=5aH}SIW^o^gAJx(Jly6f!)49{B z&MCbn?@aD|n#;et&nvj%;Wrxt3j(y7D(FO{*O9KND&%4_M0Y)%5_mq% z`!DWR8n>h8!+Lslh%MKtaicY@afthd_awE(pw?LFW6aeUG^joqi{JO)&);x`>CP|R zuH34wScC=RRB^~u2;f|t*2B2*=PC@coI9@fly#K~suIDwpvxo_-3HjMV*HFn9mG>Y zFE<#|o8`4l#Ma5gT2(A~V_^YAb2A2cnVYd_Ft7_2fajZ4nku(Dw+aV6dB90Wu0jTI_29A9#)wGZMHsx2ga8KvwP~e(0k_}i)e8I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BTgyK{E}u|85*L2Dl?$4G5^M1k$Nvvnfj|2w$T@~6iNcC7MIAtaew575!o`OM zu(4Jr^}K?Dp2rmIPF^314V)4{xy{4;De*cX?9DEUUA3ZkTouZ|KgzKov#DHg}Z2m4k-I0U#tL#aO4q-(QX>&onPjkRSh z%_zdaXEE4V90s^5oPu%Gim(x03=xuh`9;vCO|^~rb@jDK6$u*ktw=SOXf`2L6nR!7 z98Jt)sJ@ogY7`#JfAf3b+9E+!Yck@GmZ}|2ML*y87Q(6I=l^s;*u38 z>`uPBMQK=f7ZfCTwbX#c**R=ZeQk9!!fQYrw3c+eG*HRUq;*hxY5EYwjoF(vA$&LJ zsn*L*-y?V21`tNy%P(zFMnzP~?pDk0Zj>9XhTqYmjHNb-UM#5vi_rUgy*0IG@MZwQ zw@6(?_J_SRJC`N*(@KQv088A;-)K=LL~N6nsh5{&ke6xXnO(5Vc0OyD(%@(U3;hl$ z*s0%^&5$5*QXsq&6m%`r)aA4+2WfVZceqicA$&jJp$||nr%77mU!U_^QE=-oD!H42 z%K+@(2g!3c((Ix7>@`h5!y(OHxg>BU-6!Qv{g6Ct;Hn_GKF29GOj&_+jdIC>JuIOS z`*~)s(pc9RvL}#akCYI|9`)DZ#2I zWMBGZU#uvoUuqmOSW3$gJ`PmjPm)AWo$3zXrRyoVg9hY8KP{JGP%J}5o>YcsWb}lL zo)po_YzaLjqtD9dX$j4jP`8Ypk0>R56SR((fCgJf4Dp+qXNZO?^HhZ kd|I2;?^LT&aViT(cJwMcdi^_kRUN$n9lh#Py_zro1x}F`X8-^I diff --git a/BIN/ASM.S.DIR.txt b/BIN/ASM.S.DIR.txt index 2bf8d061..0bd37bb9 100644 --- a/BIN/ASM.S.DIR.txt +++ b/BIN/ASM.S.DIR.txt @@ -16,14 +16,55 @@ DIR.Init lda #$80 DIR.AC clc rts *--------------------------------------- +DIR.AT sec + .HS 90 BCC +*--------------------------------------- DIR.AS clc + lda #0 + ror + sta DIR.Byte Save b7 of last char in string + + jsr SRC.GetNextChar + bcs .9 + + sta DIR.Word Save delimiter.... + sta DIR.Word+1 Save also in prev char.. + +.1 jsr SRC.GetNextChar + bcs .8 + + cmp DIR.Word delimiter ? + beq .8 + + ldx DIR.Word+1 Get prev char + sta DIR.Word+1 replace it with new + txa + cmp DIR.Word is it the starting delimiter + beq .1 yes, skip + + jsr OUT.EmitByte no, emit prev char + bcc .1 + +.9 lda #ERR.SYNTAX.ERROR + sec rts + +.8 lda DIR.Word+1 Get prev char + cmp DIR.Word someone typed .AS "" ? + beq .80 + + ora DIR.Byte + + jmp OUT.EmitByte +.80 clc + rts *--------------------------------------- -DIR.AT clc - rts -*--------------------------------------- -DIR.AZ clc - rts +DIR.AZ jsr DIR.AS + bcs .9 + + lda #0 + jmp OUT.EmitByte +.9 rts *--------------------------------------- DIR.BS jsr SRC.GetNextChar bcs .98 @@ -36,10 +77,10 @@ DIR.BS jsr SRC.GetNextChar bne .99 lda SRC.ACC eor #$ff - sta DIR.Counter + sta DIR.Word lda SRC.ACC+1 eor #$ff - sta DIR.Counter+1 + sta DIR.Word+1 stz DIR.Byte @@ -60,9 +101,9 @@ DIR.BS jsr SRC.GetNextChar lda SRC.ACC sta DIR.Byte -.1 inc DIR.Counter +.1 inc DIR.Word bne .2 - inc DIR.Counter+1 + inc DIR.Word+1 beq .8 .2 lda DIR.Byte diff --git a/BIN/ASM.S.txt b/BIN/ASM.S.txt index 9e1f0a16..b9c41685 100644 --- a/BIN/ASM.S.txt +++ b/BIN/ASM.S.txt @@ -436,7 +436,7 @@ SRC.LINENUM .BS 2 ASM.T.hMem .BS 1 -DIR.Counter .BS 2 +DIR.Word .BS 2 DIR.Byte .BS 1 ASM.PASS .BS 1 diff --git a/TEST.S.txt b/TEST.S.txt index 95e9a68d..9a10e5c6 100644 --- a/TEST.S.txt +++ b/TEST.S.txt @@ -111,19 +111,19 @@ CS.QUIT clc rts *-------------------------------------- CS.END -MSG1 >CSTR "PrintF:%e, %e, %e\r\n%e, %e\r\nStrToF:%e, %e\r\n" +MSG1 .AZ "PrintF:%e, %e, %e\r\n%e, %e\r\nStrToF:%e, %e\r\n" FLOAT1 .HS 9B3EBC1FFD 99,999,999.9 FLOAT2 .HS 9E6E6B27FD 999,999,999 FLOAT3 .HS 9E6E6B2800 1,000,000,000 FLOAT4 .HS 8100000000 1 FLOAT5 .HS 9080000000 -32768 -CONST1 >CSTR "3.141592653" -CONST2 >CSTR "3" +CONST1 .AZ "3.141592653" +CONST2 .AZ "3" LONG1 .DA >123456789 -MSG2 >CSTR "PI/3=%e\r\n" -MSG3 >CSTR "COS(PI/3)=%e\r\n" -MSG4 >CSTR "Long=%L\r\n" -MSG5 >CSTR "Float=%e\r\n" +MSG2 .AZ "PI/3=%e\r\n" +MSG3 .AZ "COS(PI/3)=%e\r\n" +MSG4 .AZ "Long=%L\r\n" +MSG5 .AZ "Float=%e\r\n" *-------------------------------------- .DUMMY .OR 0