From b33856ee2852c29371a0eeae25bcece27a6687b5 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sun, 8 Apr 2018 14:59:45 -0700 Subject: [PATCH 01/74] Get 65802 to sort-of run JIT --- src/libsrc/jit16core.pla | 2 +- src/vmsrc/apple/plvm802.s | 30 +++++++++++------------------- src/vmsrc/apple/plvmjit02.s | 16 +++++----------- 3 files changed, 17 insertions(+), 31 deletions(-) diff --git a/src/libsrc/jit16core.pla b/src/libsrc/jit16core.pla index ccfc336..dc72445 100644 --- a/src/libsrc/jit16core.pla +++ b/src/libsrc/jit16core.pla @@ -315,7 +315,7 @@ def compiler(defptr)#0 VX-- // DEX if VY == j ^codeptr = $98; codeptr++ // TYA -> LDA #imm - + else *codeptr = $A9+(j<<8) // LDA #imm codeptr = codeptr + 2 diff --git a/src/vmsrc/apple/plvm802.s b/src/vmsrc/apple/plvm802.s index 26906da..f68bd33 100644 --- a/src/vmsrc/apple/plvm802.s +++ b/src/vmsrc/apple/plvm802.s @@ -343,26 +343,15 @@ BYE LDY DEFCMD ; STY $01FF CMDENTRY = * ; -; SET DCI STRING FOR JIT MODULE -; - LDA #'J'|$80 - STA JITMOD+0 - LDA #'I'|$80 - STA JITMOD+1 - LDA #'T'|$80 - STA JITMOD+2 - LDA #'1'|$80 - STA JITMOD+3 - LDA #'6' - STA JITMOD+4 -; -; DEACTIVATE 80 COL CARDS +; DEACTIVATE 80 COL CARDS AND SET DCI STRING FOR JIT MODULE ; BIT ROMEN LDY #4 - LDA DISABLE80,Y ORA #$80 JSR $FDED + LDA JITDCI,Y + STA JITMOD,Y DEY BPL - BIT $C054 ; SET TEXT MODE @@ -376,7 +365,7 @@ CMDENTRY = * ; ; INSTALL PAGE 0 FETCHOP ROUTINE ; - LDY #$11 + LDY #$0F - LDA PAGE0,Y STA DROP,Y DEY @@ -440,7 +429,7 @@ CMDENTRY = * ; PRINT FAIL MESSAGE, WAIT FOR KEYPRESS, AND REBOOT ; FAIL INC $3F4 ; INVALIDATE POWER-UP BYTE - LDY #31 + LDY #11 - LDA FAILMSG,Y ORA #$80 JSR $FDED @@ -460,7 +449,8 @@ READPARMS !BYTE 4 CLOSEPARMS !BYTE 1 !BYTE 0 DISABLE80 !BYTE 21, 13, '1', 26, 13 -FAILMSG !TEXT "...TESER OT YEK YNA .DMC GNISSIM" +JITDCI !BYTE 'J'|$80,'I'|$80,'T'|$80,'1'|$80,'6' +FAILMSG !TEXT ".DMC GNISSIM" PAGE0 = * ;****************************** ;* * @@ -575,6 +565,8 @@ RUNJIT DEX ; ADD PARAMETER TO DEF ENTRY STA IP STX ESP TSX + DEX ; TAKE INTO ACCOUNT JSR BELOW + DEX STX HWSP STX ALTRDON LDX #>OPXTBL @@ -588,7 +580,7 @@ SETDBG LDY LCRWEN+LCBNK2 STX OPPAGE LDY #$00 JSR FETCHOP ; CALL JIT COMPILER - !AS + !AS ; RETURN IN EMULATION MODE PLA STA TMPH PLA @@ -1989,7 +1981,7 @@ RET SEC ; SWITCH TO EMULATION MODE PLP RTS ;* -;* RETURN TO NATIVE CODE +;* RETURN TO NATIVE CODE (EMULATION MODE FOR NOW, ACTUALLY) ;* NATV TYA ; FLATTEN IP SEC diff --git a/src/vmsrc/apple/plvmjit02.s b/src/vmsrc/apple/plvmjit02.s index f0d57f8..2d75e7c 100755 --- a/src/vmsrc/apple/plvmjit02.s +++ b/src/vmsrc/apple/plvmjit02.s @@ -278,22 +278,15 @@ BYE LDY DEFCMD ; STY $01FF CMDENTRY = * ; -; SET DCI STRING FOR JIT MODULE -; - LDA #'J'|$80 - STA JITMOD+0 - LDA #'I'|$80 - STA JITMOD+1 - LDA #'T' - STA JITMOD+2 -; -; DEACTIVATE 80 COL CARDS +; DEACTIVATE 80 COL CARDS AND SET DCI STRING FOR JIT MODULE ; BIT ROMEN LDY #4 - LDA DISABLE80,Y ORA #$80 JSR $FDED + LDA JITDCI,Y + STA JITMOD,Y DEY BPL - BIT $C054 ; SET TEXT MODE @@ -316,7 +309,7 @@ CMDENTRY = * ; ; INSTALL PAGE 3 VECTORS ; - LDY #$16 + LDY #$12 - LDA PAGE3,Y STA INTERP,Y DEY @@ -387,6 +380,7 @@ READPARMS !BYTE 4 CLOSEPARMS !BYTE 1 !BYTE 0 DISABLE80 !BYTE 21, 13, '1', 26, 13 +JITDCI !BYTE 'J'|$80,'I'|$80,'T' FAILMSG !TEXT ".DMC GNISSIM" PAGE0 = * ;****************************** From f097361b83eaaaa085a46fd98f7b4e1814e425e6 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Mon, 9 Apr 2018 07:16:07 -0700 Subject: [PATCH 02/74] Update Version 1.1.md --- doc/Version 1.1.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/Version 1.1.md b/doc/Version 1.1.md index a96201d..2ea7ca2 100644 --- a/doc/Version 1.1.md +++ b/doc/Version 1.1.md @@ -4,13 +4,13 @@ Welcome to PLASMA: the Grand Unifying Platform for the Apple 1, ][, and ///. Download the four disk images (three if you don't plan to boot an Apple ///): -[PLASMA 1.1 System and ProDOS Boot](https://github.com/dschmenk/PLASMA/blob/master/PLASMA-SYS1.PO?raw=true) +[PLASMA 1.1 System and ProDOS Boot](https://github.com/dschmenk/PLASMA/blob/ver-1/PLASMA-SYS1.PO?raw=true) -[PLASMA 1.1 Build Tools](https://github.com/dschmenk/PLASMA/blob/master/PLASMA-BLD1.PO?raw=true) +[PLASMA 1.1 Build Tools](https://github.com/dschmenk/PLASMA/blob/ver-1/PLASMA-BLD1.PO?raw=true) -[PLASMA 1.1 Demos](https://github.com/dschmenk/PLASMA/blob/master/PLASMA-DEM1.PO?raw=true) +[PLASMA 1.1 Demos](https://github.com/dschmenk/PLASMA/blob/ver-1/PLASMA-DEM1.PO?raw=true) -[PLASMA 1.1 Apple /// SOS Boot ](https://github.com/dschmenk/PLASMA/blob/master/PLASMA-SOS1.PO?raw=true) +[PLASMA 1.1 Apple /// SOS Boot ](https://github.com/dschmenk/PLASMA/blob/ver-1/PLASMA-SOS1.PO?raw=true) PLASMA can be run from floppies, System in Drive 1, and Build or Demos in Drive 2. Mass storage is the recommended installation that looks like (replacing HARDISK with your volume name of choice): From 8ee09363f06a568b3557cbde0f01e90906b61374 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Mon, 9 Apr 2018 08:15:15 -0700 Subject: [PATCH 03/74] New Acronym --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f7c52dc..7d2f5fa 100755 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ![Luc Viatour](https://upload.wikimedia.org/wikipedia/commons/thumb/2/26/Plasma-lamp_2.jpg/1200px-Plasma-lamp_2.jpg) image credit: Luc Viatour / www.Lucnix.be -PLASMA: **P**roto **L**anguage **A**s**S**e**M**bler for **A**pple +PLASMA: **P**roto **L**anguage **A**s**S**e**M**bler for **A**ll PLASMA is a medium level programming language targeting the 8-bit 6502 processor. Historically, there were simple languages developed in the early years of computers that improved on the tedium of assembly language programming while still being low level enough for system coding. Languages like B, FORTH, and PLASMA fall into this category. From f8840347867a25a8b0bb53b550c7ea50acec610a Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Mon, 9 Apr 2018 08:51:00 -0700 Subject: [PATCH 04/74] Update image with SOS.DRIVERS for Mame Apple /// --- PLASMA-SOS2.PO | Bin 143360 -> 143360 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/PLASMA-SOS2.PO b/PLASMA-SOS2.PO index 2f0823094c040e046fe7b7b897c6a71be136e058..cedb9791908d488e79b6e7877d9112dc8c0b49f1 100644 GIT binary patch delta 5837 zcmZ`+3s_Xu_TT%w89f6kDxl>-5Cx-*0`dxp3u?_sjFK@a z_mpW}?&WU{a%LDEAni{@jbb)ag5#64`<0n_wS3I=(=4s{uQQ|Jy{~? zYpwmjbdEEf>)y%!yx^p_`wbh2)Rs5RW#GMXAvdAyMdCgzBTiLd7g< z-jj+E{{G9+(>Vh9)l#z;E}Nh2R~sIQ)Ces@ukIQ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XmqDkJ~FePCKiW`3c(LUg;9t zeYDrOUNm%j(gsjE?3=$YVDxmFtvYJ+55>w5X(k1Rua5JRg{tU{-qv5XrtQ)`ihxPAs=EgZ-^=ces8@;1fJPgJW2TMFZBX<65DeE~=? ySQ_~>WYY%Qn%6e0u4%1Pd_YVZ`E+EP(bg2KTfMfXr7n0;P8s>lBr!yiw*Lb6Qx8@E From daf25e990ad51de26df0e29821f9a78e18638bdd Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Mon, 9 Apr 2018 09:13:17 -0700 Subject: [PATCH 05/74] Running out of disk image space --- PLASMA-BLD2.PO | Bin 143360 -> 143360 bytes PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes src/mkrel | 33 +++++++++++++++++++-------------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/PLASMA-BLD2.PO b/PLASMA-BLD2.PO index 500cddb78409886c3c8d2c5662f338127583c843..926a5646ebb1e31af24b9e96c66b86e1add9a472 100644 GIT binary patch delta 89 zcmZp8z|ru4V}mLSqu6FO7F%Xj;UIq(1|;xLfRPcz?Rdj0$ieWKK>)2sn5MBav2SNrV*1Go0EXWbSO5S3 delta 470 zcmYMv%}N4M6bJA-b0_cQ)Qk-^Gu9#y3_tMu8&rrva1mNF1=3}93B83@Ann`r0Imfe zK@nP1f^Av^f~%khXk{ITE1u0gzx%)E!0pb(?pz!M1@2&YB2;h?S?3M&^vp!8mV2Ct zkc=LFJgSHm$hT^SkK|e4{)Qa?#ofz2nd{5Edc5@VZG>#qkH&|i_qUhkWO_B3&OWTs z>v;BQKXH73_iV#)(}9)i%4tXI7NI+TWrKlsy}_?mz+OxX&gyDQFA_kJp(FuH3<(90 zaDj|0-oZ4>k{ki#R_MTnyadX#D53x&Y$%0gOj9gL6F{0FBLOlDF$EA~GfC{jG|7@U z0mNOD^p*r@xoB%q1rT+p`!8b`tAy4Xmo>{-=w(U8wCujSHL41r%3$GrLhXx?6?TwO emjGs{9=4sHZfY{2Av4^xoo~a|d;q&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CW3!STvlln=;_UlN+4;4}| zOz%P}E}^9212ME8e?lsbaUm6#^pc7j1Ei?YDsz++m6@`qJL^`XmQbz}9I9IKFD(_H zR2ZAy8zx{IYvsFx1H$L(d%4A-1ch)nz`O8%tqE6Lyv17oIQjl@!OT^KYJ5nc8Y?N) zs4N;vHJ)}-jd=>y_>Mv~+7zm>@&>B0QlT0#I#_L#YP_aUjn@>au}+~HF}8hFW8L*s zBZ~DnYsG(oTb!-MZ6eAoZVaFi4)==iRJg@W3b*)eFSmFF z+~OvMThuGuVjz#9C<^T15d--sd>R*v@A%QrWDx@h9?^0gk%&3G=qFyq_IHwYtqPI& znL_nV3Kh>P_k?PD?+JYxY%1y@64O!HVv=(jMB-^a>NLOev_d3;M?BrbBc7%_B84Rr z@zLI^MX!eX(Yre|Gpc8F0EwVa=;_RUl>7w&Nd!Q53 V{jdb1^psB2>BMiV2M8ya{{v9 Date: Mon, 9 Apr 2018 09:16:02 -0700 Subject: [PATCH 06/74] Update image --- PLASMA-SOS2.PO | Bin 143360 -> 143360 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/PLASMA-SOS2.PO b/PLASMA-SOS2.PO index cedb9791908d488e79b6e7877d9112dc8c0b49f1..4c4abb4254f970d5a0a841863f2a9e37f1e71412 100644 GIT binary patch delta 4651 zcmb7IdsGxxn!i1Hdn&BEgGnF zdR^N#lF26RgY=rr&bnF5hDTR}Jk93pJmMob7;z*%GG`_;XA^T)*-2bUCdr=38D)RB z8-?V|Kf~d7>$~6g`yTgM1$#e~_I@Z0EE1N8L?mX;R=2LszQ(0i*VYjBlO&OJ@~=7M zAImaQ7Lt!iT!_>NRq5Z4n@*4>bXycn=`({8GJo^A|3PcS3J`l?mpFhx%*i6aQD%kgFXM=^HKLx z(TAc(qGQqDL|44=#T$msicV+eMCbL+Yh7P>-bLiPRA^!^yg-tttB4#mt-ie8klLx}F z@PXLmiHQR*4gWF!6HYqNH<3IjDhGyd6*hClftY_f>P>Q|D5sBY6ga+xr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Tu3~l^#4N9_HRsz0W?b}OZ=UZc-F+wg(s53JPacQ z?#c2(t|usqD^rA-bme`DZRK4u+<4tCy6`N5an}HQPJzu@?>bZ&K!LUxCZGkM)I#fl zOa;{}(yhDzf`ZDW%y|Vq!?zFJ0*RNf5Hc^(d2E?y6_SNY#vOW2!70VWCG(;^NjFzW zrf9&`UH)c9I|bT_7DG7E$mePUFA^TdwqXn2(Kc*3V^l&G>-Ut z*=92`1=(f6oy4@On^yHB5(o!<9aI5t`UzK0f1lkp+Gh{hx@}g{r~P(gvdZsayo%z9 z$twVdqu1lg7I_tVBM4+8#E^+WqEa{@K*UfdW-cn27&Fh~S(mwlr;y3MsNmklz=tP% zMkrzuuVb=gUZibcI2N<(Of6BLZDh3^qp~?iVG5$mWWhH}KB`X4VHo#r6R;(NLGL1| z$Y9KSzKp{hvJ7T1h+H!0$XLUc%rmA%vUuz=LC1cnperHNnRAM_u`7~}-1=FXm!pR{ z$82~AGq3YAG$do>!V`ZOSZYF`>Pg3?KQK|=`(4!y;@{F$WDJ9-4&`Y+V zo`XZt(!7^z?t>6+wq8p>+=rcg>u0l6l zIks#{l)1bt(ExP0ERj|zE@usqX!TqkQAI8rB4y*;Xa{A{Ro!K4|KG-1SB#}TOvXw` zrPcF)s&K2)$Go}5lxEszHIHuP*5#ucfNm`xomMH6s6SvucF%THGPMquZ;+`U5o`zC z#nh(=b^>l^>W>Mw0roKU0>QO_olJd=;4okZQwsz~|N1q%W#i6IZP8 Date: Mon, 9 Apr 2018 10:17:29 -0700 Subject: [PATCH 07/74] update image --- PLASMA-DEM2.PO | Bin 143360 -> 143360 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/PLASMA-DEM2.PO b/PLASMA-DEM2.PO index 2c4c1b3a82b93422f7c28fcb24a0eef7dfcce932..1ee53641774ad13371ef918424a449a376ea176b 100644 GIT binary patch delta 3203 zcmbW3!E4h{9LImjx~=WfcJ0#AwNs{!QY#1w!mP!0;HF5#I#k4ih7ocYb>?l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TK%Gp~o4N~KC+7OIQHQ#}PH`~aO$*yIj=eHKML=3t%R z4skW5PAEdtAwCh;K>7)ylRv|O5Z9>?HyvR=^%%S9$fP@Sz1dGDC#r)Z_6z-gi0eTS zzYaTy{f+JU=KRu<#_qU-Fm@kzpxE^8K*hA~AdOAY2Oafpn{`niZ0zXJVCtTAl8$<3 zog|FiXPq2Oz3v)20Cm#X6nzAsPA2l|#HH?M?5&VP-QU=r4WJ)&X9I|h-O))en_y$( z%+{o#(22L&Gt=<~u*W_X#q{oFAKBaQu3ak~V#{Y_059Uxy%={E#Vt7!x-^u0GWBL7 M68gFkVP53^0hRSfmjD0& From 07733cc5a6c85e71b3f7387e8c21d1b85b7140c8 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Tue, 10 Apr 2018 18:11:35 -0700 Subject: [PATCH 08/74] JIT 65802 WIP --- src/libsrc/jit16core.pla | 1285 ++++++++++++++++--------------------- src/libsrc/jitcore.pla | 10 +- src/vmsrc/apple/plvm802.s | 58 +- 3 files changed, 568 insertions(+), 785 deletions(-) diff --git a/src/libsrc/jit16core.pla b/src/libsrc/jit16core.pla index dc72445..bcb1e98 100644 --- a/src/libsrc/jit16core.pla +++ b/src/libsrc/jit16core.pla @@ -1,32 +1,14 @@ // -// TOS caching values +// TOS and NOS stack offsets // -const TOS_DIRTY = 1 -const TOS_CLEAN = 2 -// -// Y unknown value -// -const UNKNOWN = -1 -// -// Resolve virtual X with real X -// -def resolveX(codeptr, VX)#2 - while VX > 0 - ^codeptr = $E8; codeptr++ // INX - VX-- - loop - while VX < 0 - ^codeptr = $CA; codeptr++ // DEX - VX++ - loop - return codeptr, 0 -end +const TOS = $01 // TOS +const NOS = $03 // TOS-1 // // JIT compiler entry // def compiler(defptr)#0 - word codeptr, isdata[], addrxlate, bytecode, i, case, dest, VX, VY - byte opcode, j, A_IS_TOSL + word codeptr, isdata[], addrxlate, bytecode, i, case, dest + byte opcode, j, A_IS_TOS, X_IS_IFP //puts("JIT compiler invoked for :$"); puth(defptr=>bytecodeaddr); putln addrxlate = heapmark // heapalloc(512 + defptr->bytecodesize) @@ -155,23 +137,29 @@ def compiler(defptr)#0 // memset(addrxlate, 0, 512) // Clear xlate buffer //puts("Bytecode: $"); puth(bytecode); putln; getc - codeptr = *jitcodeptr - A_IS_TOSL = FALSE - VY = UNKNOWN // Virtual Y register - VX = 0 // Virtual X register - i = 0 + codeptr = *jitcodeptr + A_IS_TOS = FALSE + X_IS_IFP = FALSE + codeptr->0 = $20 // JSR INTERP + codeptr=>1 = directentry if ^bytecode == $58 //putc('$'); puth(codeptr);//puts(":[0] ENTER "); puti(^(bytecode+1)); putc(',');puti(^(bytecode+2)); putln // // Call into VM // - codeptr->0 = $20 // JSR INTERP - codeptr=>1 = directentry codeptr->3 = $58 // ENTER CODE codeptr=>4 = *(bytecode+1) // ENTER FRAME SIZE & ARG COUNT codeptr->6 = $C0 // NATV CODE codeptr = codeptr + 7 i = 3 + else + // + // Call into VM + // + codeptr->3 = $C0 // NATV CODE + codeptr = codeptr + 4 + i = 0 + fin while isule(codeptr, codemax) //putc('$'); puth(codeptr); putc(':') @@ -181,14 +169,12 @@ def compiler(defptr)#0 // // Optimization fence. Sync A and X registers // - codeptr, VX = resolveX(codeptr, VX) - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095//+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA fin - VY = UNKNOWN - A_IS_TOSL = FALSE - opcode = opcode & $FE + A_IS_TOS = FALSE + X_IS_IFP = FALSE + opcode = opcode & $FE fin // // Update bytecode->native code address translation. @@ -225,189 +211,141 @@ def compiler(defptr)#0 // if opcode < $20 // CONSTANT NYBBLE //puts("CN $"); putb(opcode/2) - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA fin - VX-- // DEX - if VY <> 0 - *codeptr = $00A0 // LDY #$00 - codeptr = codeptr + 2 - VY = 0 - fin - *codeptr = $C094+(VX<<8) // STY ESTKH,X - codeptr = codeptr + 2 - if opcode == 0 - ^codeptr = $98; codeptr++ // TYA -> LDA #$00 - else - *codeptr = $A9+(opcode/2<<8) // LDA #(CN/2) - codeptr = codeptr + 2 - fin - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + codeptr->0 = $A9 // LDA #(CN/2) + codeptr=>1 = opcode/2 + codeptr = codeptr + 3 + A_IS_TOS = TRUE // PHA else when opcode is $20 // MINUS ONE //puts("MINUS_ONE") - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA fin - VX-- // DEX - codeptr=>0 = $FFA9 // LDA #$FF - codeptr=>2 = $C095+(VX<<8) // STA ESTKH,X - codeptr = codeptr + 4 - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + codeptr->0 = $A9 // LDA #$FFFF + codeptr=>1 = $FFFF + codeptr = codeptr + 3 + A_IS_TOS = TRUE // PHA break is $22 // BREQ is $24 // BRNE i++ dest = i + *(bytecode+i) i++ - codeptr, VX = resolveX(codeptr, VX + 2) // INX; INX - if not A_IS_TOSL - *codeptr = $D0B5-$0200//+(VX<<8) // LDA ESTKL-2,X - codeptr = codeptr + 2 + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin + codeptr=>0 = $C3+(TOS<<8) // CMP TOS,S if opcode == $22 //puts("BREQ "); puti(dest) - codeptr=>2 = $09D0 // BNE +9 - codeptr=>8 = $03D0 // BNE +3 + codeptr=>2 = $04D0 // BNE +4 else //puts("BRNE "); puti(dest) - codeptr=>2 = $06D0 // BNE +6 - codeptr=>8 = $03F0 // BEQ +3 + codeptr=>2 = $04F0 // BEQ +4 fin - codeptr=>0 = $D0D5-$0100//+(VX<<8) // CMP ESTKL-1,X - codeptr=>4 = $C0B5-$0200//+(VX<<8) // LDA ESTKH-2,X - codeptr=>6 = $C0D5-$0100//+(VX<<8) // CMP ESTKH-1,X - codeptr->10 = $4C // JMP abs - codeptr=>11 = addrxlate=>[dest] - if not (codeptr->12 & $80) // Unresolved address list - addrxlate=>[dest] = codeptr + 11 - *jitcodeptr + codeptr=>4 = $4C68 // PLA; JMP abs + codeptr=>6 = addrxlate=>[dest] + if not (codeptr->7 & $80) // Unresolved address list + addrxlate=>[dest] = codeptr + 6 - *jitcodeptr fin - codeptr = codeptr + 13 - A_IS_TOSL = FALSE + codeptr->8 = $68 // PLA + codeptr = codeptr + 9 + A_IS_TOS = FALSE break is $26 // LA is $2C // CW dest = *(bytecode+i+1) i = i + 2 //puts("LA/CW $"); puth(dest) - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA fin - VX-- // DEX - codeptr=>0 = $A9+(dest&$FF00) // LDA #2 = $C095+(VX<<8) // STA ESTKH,X - codeptr=>4 = $A9+(dest<<8) // LDA #>VAL - codeptr = codeptr + 6 - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + codeptr->0 = $A9 // LDA #imm + codeptr=>1 = dest + codeptr = codeptr + 3 + A_IS_TOS = TRUE // PHA break is $28 // LLA i++ j = ^(bytecode+i) //puts("LLA "); puti(^(bytecode+i)) - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA + fin + if not X_IS_IFP + *codeptr = $E0A6 // LDX IFP codeptr = codeptr + 2 + X_IS_IFP = TRUE fin - VX-- // DEX - if VY == j - ^codeptr = $98; codeptr++ // TYA -> LDA #imm - - else - *codeptr = $A9+(j<<8) // LDA #imm - codeptr = codeptr + 2 - fin - codeptr->0 = $18 // CLC - codeptr=>1 = $E065 // ADC IFPL - codeptr=>3 = $D095+(VX<<8) // STA ESTKL,X - if VY == 0 - codeptr->5 = $98 // TYA -> LDA #00 - codeptr = codeptr + 6 - else - codeptr=>5 = $00A9 // LDA #$00 - codeptr = codeptr + 7 - fin - codeptr=>0 = $E165 // ADC IFPH - codeptr=>2 = $C095+(VX<<8) // STA ESTKH,X - codeptr = codeptr + 4 - A_IS_TOSL = FALSE + codeptr=>0 = $188A // TXA; CLC + codeptr->2 = $69 // ADC #imm + codeptr=>3 = j + codeptr = codeptr + 5 + A_IS_TOS = TRUE break is $2A // CB is $5E // CFFB i++ - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA fin - VX-- // DEX - if opcode == $2A - //puts("CB $"); putb(^(bytecode+i)) - if VY <> 0 - *codeptr = $00A0 // LDY #$00 - codeptr = codeptr + 2 - VY = 0 - fin - codeptr=>0 = $C094+(VX<<8) // STY ESTKH,X - codeptr = codeptr + 2 + codeptr->0 = $A9 + if opcode == $2A // LDA #imm + dest = ^(bytecode+i) + //puts("CB $"); putb(dest) else - //puts("CFFB $FF"); putb(^(bytecode+i)) - codeptr=>0 = $FFA9 // LDA #$FF - codeptr=>2 = $C095+(VX<<8) // STA ESTKH,X - codeptr = codeptr + 4 + dest = ^(bytecode+i) | $FF00 + //puts("CFFB $FF"); puth(dest) fin - *codeptr = $A9+(^(bytecode+i)<<8) // LDA #imm - codeptr = codeptr + 2 - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + codeptr=>1 = dest + codeptr = codeptr + 3 + A_IS_TOS = TRUE // PHA break is $2E // CS i++ j = ^(bytecode+i) - dest = codeptr + 10 + j + dest = codeptr + 7 + j //puts("CS "); //puts(bytecode+i); //puts("-->"); puti(dest) if isule(dest, codemax) - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA fin - VX-- // DEX - codeptr=>0 = $A9+((codeptr+9)&$FF00) // LDA #>STRING - codeptr=>2 = $C095+(VX<<8) // STA ESTKH,X - codeptr=>4 = $A9+((codeptr+9)<<8) // LDA #6 = $4C // JMP abs - dest = codeptr + 10 + j - codeptr=>7 = dest - strcpy(codeptr + 9, bytecode + i) + dest = codeptr + 7 + j + codeptr->0 = $A9 // LDA #STRING + codeptr=>1 = codeptr + 6 + codeptr->3 = $4C // JMP abs + codeptr=>4 = dest + strcpy(codeptr + 6, bytecode + i) i = i + j fin - codeptr = dest - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + codeptr = dest + A_IS_TOS = TRUE // PHA break is $32 // DROP2 //puts("DROP2") - VX++ // INX + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA + fin + A_IS_TOS = FALSE is $30 // DROP //puts("DROP") - VX++ // INX - A_IS_TOSL = FALSE + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA + fin + A_IS_TOS = FALSE break is $34 // DUP //puts("DUP") - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 - elsif A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X + if not A_IS_TOS + *codeptr = $A3+(TOS<<8) // LDA S, TOS codeptr = codeptr + 2 + else + ^codeptr = $48; codeptr++ // PHA fin - codeptr=>0 = $C0B4+(VX<<8) // LDY ESTKH,X - VX-- // DEX - codeptr=>2 = $C094+(VX<<8) // STY ESTKH,X - codeptr = codeptr + 4 - VY = UNKNOWN - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + A_IS_TOS = TRUE // PHA break //is $36 //puts("DIVMOD") @@ -417,203 +355,172 @@ def compiler(defptr)#0 //break is $38 // ADDI i++ - j = ^(bytecode+i) //puts("ADDI $"); putb(^(bytecode+i)) + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA + fin + codeptr=>0 = $6918 // CLC; ADC #imm + codeptr=>2 = ^(bytecode+i) + codeptr = codeptr + 4 + A_IS_TOS = TRUE // PHA + break is $8C // INCR - if opcode == $8C - //puts("INCR") - j = 1 + //puts("INCR") + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 - fin - codeptr->0 = $18 // CLC - codeptr=>1 = $69+(j<<8) // ADC #imm - codeptr=>3 = $0290 // BCC +2 - codeptr=>5 = $C0F6+(VX<<8) // INC ESTKH,X - codeptr = codeptr + 7 - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + ^codeptr = $1A; codeptr++ // INC A + A_IS_TOS = TRUE // PHA break is $3A // SUBI i++ - j = ^(bytecode+i) //puts("SUBI $"); putb(^(bytecode+i)) + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA + fin + codeptr=>0 = $E938 // SEC; SBC #imm + codeptr=>2 = ^(bytecode+i) + codeptr = codeptr + 4 + A_IS_TOS = TRUE // PHA + break is $8E // DECR - if opcode == $8E - //puts("DECR") - j = 1 + //puts("DECR") + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 - fin - codeptr->0 = $38 // SEC - codeptr=>1 = $E9+(j<<8) // SBC #imm - codeptr=>3 = $02B0 // BCS +2 - codeptr=>5 = $C0D6+(VX<<8) // DEC ESTKH,X - codeptr = codeptr + 7 - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + ^codeptr = $3A; codeptr++ // DEC A + A_IS_TOS = TRUE // PHA break is $3C // ANDI i++ //puts("ANDI $"); putb(^(bytecode+i)) - if VY <> 0 - *codeptr = $00A0 // LDY #$00 - codeptr = codeptr + 2 - VY = 0 + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 - fin - codeptr=>0 = $29+(^(bytecode+i)<<8) // AND #imm - codeptr=>2 = $C094+(VX<<8) // STY ESTKH,X - codeptr = codeptr + 4 - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + codeptr->0 = $29 // AND #imm + codeptr=>1 = ^(bytecode+i) + codeptr = codeptr + 3 + A_IS_TOS = TRUE // PHA break is $3E // ORI i++ //puts("ORI $"); putb(^(bytecode+i)) - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - *codeptr = $09+(^(bytecode+i)<<8) // ORA #imm - codeptr = codeptr + 2 - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + codeptr->0 = $09 // ORA #imm + codeptr=>1 = ^(bytecode+i) + codeptr = codeptr + 3 + A_IS_TOS = TRUE // PHA break is $40 // ISEQ is $42 // ISNE - if VY <> 0 - *codeptr = $00A0 // LDY #$00 - codeptr = codeptr + 2 - fin - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin + codeptr->0 = $A0 // LDY #$0000 + codeptr=>1 = $0000 + codeptr=>3 = $C3+(TOS<<8) // CMP TOS,S if opcode == $40 //puts("ISEQ") - codeptr=>2 = $07D0 // BNE +7 - codeptr=>8 = $01D0 // BNE +1 + codeptr=5 = $01D0 // BNE +1 else //puts("ISNE") - codeptr=>2 = $06D0 // BNE +6 - codeptr=>8 = $01F0 // BEQ +1 + codeptr=>5 = $01F0 // BEQ +1 fin - codeptr=>0 = $D0D5+$0100+(VX<<8) // CMP ESTKL+1,X - codeptr=>4 = $C0B5+(VX<<8) // LDA ESTKH,X - codeptr=>6 = $C0D5+$0100+(VX<<8) // CMP ESTKH+1 - codeptr=>10 = $9888 // DEY; TYA - codeptr=>12 = $C094+$0100+(VX<<8) // STY ESTKH+1,X - codeptr = codeptr + 14 - VX++ // INX - VY = UNKNOWN - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + codeptr=>7 = $9888 // DEY; TYA + codeptr->9 = $7A // PLY + codeptr = codeptr + 10 + A_IS_TOS = TRUE // PHA break is $44 // ISGT is $4A // ISLE - if VY <> 0 - *codeptr = $00A0 // LDY #$00 - codeptr = codeptr + 2 + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 - fin - codeptr=>0 = $D0D5+$0100+(VX<<8) // CMP ESTKL+1,X - codeptr=>2 = $C0B5+(VX<<8) // LDA ESTKH,X - codeptr=>4 = $C0F5+$0100+(VX<<8) // SBC ESTKH+1 - codeptr=>6 = $0250 // BVC +2 - codeptr=>8 = $8049 // EOR #$80 + codeptr->0 = $A0 // LDY #$0000 + codeptr=>1 = $0000 + codeptr->3 = $38 // SEC + codeptr=>4 = $C3+(TOS<<8) // SBC TOS,S + codeptr=>6 = $0250 // BVC +3 + codeptr->8 = $49 // EOR #$8000 + codeptr=>9 = $8000 if opcode == $44 //puts("ISGT") - codeptr=>10 = $0110 // BPL +1 + codeptr=>11 = $0110 // BPL +1 else //puts("ISLE") - codeptr=>10 = $0130 // BMI +1 + codeptr=>11 = $0130 // BMI +1 fin - codeptr=>12 = $9888 // DEY TYA - codeptr=>14 = $C094+$0100+(VX<<8) // STY ESTKH+1,X + codeptr=>13 = $9888 // DEY; TYA + codeptr->15 = $7A // PLY codeptr = codeptr + 16 - VX++ // INX - VY = UNKNOWN - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + A_IS_TOS = TRUE // PHA break is $46 // ISLT is $48 // ISGE - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - if VY <> 0 - *codeptr = $00A0 // LDY #$00 - codeptr = codeptr + 2 - fin - codeptr=>0 = $D0B5+$0100+(VX<<8) // LDA ESTKL+1,X - codeptr=>2 = $D0D5+(VX<<8) // CMP ESTKL,X - codeptr=>4 = $C0B5+$0100+(VX<<8) // LDA ESTKH+1,X - codeptr=>6 = $C0F5+(VX<<8) // SBC ESTKH - codeptr=>8 = $0250 // BVC +2 - codeptr=>10 = $8049 // EOR #$80 + codeptr->0 = $A0 // LDY #$0000 + codeptr=>1 = $0000 + codeptr=>3 = $E685 // STA TMP + codeptr=>5 = $3868 // PLA; SEC + codeptr=>7 = $E6E5 // SBC TMP + codeptr=>9 = $0250 // BVC +3 + codeptr->11 = $49 // EOR #$8000 + codeptr=>12 = $8000 if opcode == $46 //puts("ISLT") - codeptr=>12 = $0110 // BPL +1 + codeptr=>14 = $0110 // BPL +1 else //puts("ISGE") - codeptr=>12 = $0130 // BMI +1 + codeptr=>14 = $0130 // BMI +1 fin - codeptr=>14 = $9888 // DEY; TYA - codeptr=>16 = $C094+$0100+(VX<<8) // STY ESTKH+1,X + codeptr=>16 = $9888 // DEY; TYA codeptr = codeptr + 18 - VX++ // INX - VY = UNKNOWN - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + A_IS_TOS = TRUE // PHA break is $4C // BRFLS is $4E // BRTRU i++ dest = i + *(bytecode+i) i++ - codeptr, VX = resolveX(codeptr, VX + 1) // INX - if not A_IS_TOSL - *codeptr = $D0B5-$0100//+(VX<<8) // LDA ESTKL-1,X - codeptr = codeptr + 2 + if not A_IS_TOS + codeptr->0 = $68 // PLA + else + codeptr->0 = $A8 // TAY fin - codeptr=>0 = $C015-$0100//+(VX<<8) // ORA ESTKH-1,X if opcode == $4C //puts("BRFLS "); puti(dest) - codeptr=>2 = $03D0 // BNE +3 + codeptr=>1 = $03D0 // BNE +3 else //puts("BRTRU "); puti(dest) - codeptr=>2 = $03F0 // BEQ +3 + codeptr=>1 = $03F0 // BEQ +3 fin - codeptr->4 = $4C // JMP abs - codeptr=>5 = addrxlate=>[dest] - if not (codeptr->6 & $80) // Unresolved address list - addrxlate=>[dest] = codeptr + 5 - *jitcodeptr + codeptr->3 = $4C // JMP abs + codeptr=>4 = addrxlate=>[dest] + if not (codeptr->5 & $80) // Unresolved address list + addrxlate=>[dest] = codeptr + 4 - *jitcodeptr fin - codeptr = codeptr + 7 - A_IS_TOSL = FALSE + codeptr = codeptr + 6 + A_IS_TOS = FALSE break is $50 // BRNCH i++ dest = i + *(bytecode+i) i++ //puts("BRNCH "); puti(dest) - codeptr, VX = resolveX(codeptr, VX) - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095//+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA fin - codeptr->0 = $4C // JMP abs + codeptr->0 = $4C // JMP abs codeptr=>1 = addrxlate=>[dest] if not (codeptr->2 & $80) // Unresolved address list addrxlate=>[dest] = codeptr + 1 - *jitcodeptr fin - codeptr = codeptr + 3 - A_IS_TOSL = FALSE + codeptr = codeptr + 3 + A_IS_TOS = FALSE break is $52 // SEL i++ @@ -625,34 +532,30 @@ def compiler(defptr)#0 if isule(dest, codemax) ^(bytecode+case) = $FE // Flag as NOP case++ - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 + if not A_IS_TOS + codeptr->0 = $68 // PLA fin - codeptr=>0 = $C0B4+(VX<<8) // LDY ESTKH,X - codeptr, VX = resolveX(codeptr + 2, VX + 1) // INX repeat dest = *(bytecode+case) //puts(" $"); puth(dest) - codeptr=>0 = $C9+(dest<<8) // CMP #imm - codeptr=>2 = $07D0 // BNE +7 - codeptr=>4 = $C0+(dest&$FF00) // CPY #imm - codeptr=>6 = $03D0 // BNE +3 + codeptr->0 = $C9 // CMP #imm + codeptr=>1 = dest + codeptr=>3 = $03D0 // BNE +3 *(bytecode+case) = $FEFE case = case + 2 dest = case + *(bytecode+case) //puts("-->"); puti(dest); putln - codeptr->8 = $4C // JMP abs - codeptr=>9 = addrxlate=>[dest] - if not (codeptr->10 & $80) // Unresolved address list - addrxlate=>[dest] = codeptr + 9 - *jitcodeptr + codeptr->5 = $4C // JMP abs + codeptr=>6 = addrxlate=>[dest] + if not (codeptr->7 & $80) // Unresolved address list + addrxlate=>[dest] = codeptr + 6 - *jitcodeptr fin - codeptr = codeptr + 11 + codeptr = codeptr + 8 *(bytecode+case) = $FEFE case = case + 2 j-- until not j - codeptr->0 = $4C // JMP abs + codeptr->0 = $4C // JMP abs codeptr=>1 = addrxlate=>[case] if not (codeptr->2 & $80) // Unresolved address list addrxlate=>[case] = codeptr + 1 - *jitcodeptr @@ -661,47 +564,53 @@ def compiler(defptr)#0 else codeptr = dest fin - VY = UNKNOWN - A_IS_TOSL = FALSE + A_IS_TOS = FALSE break is $54 // CALL //puts("CALL $"); puth(*(bytecode+i)) // // Call address // - codeptr, VX = resolveX(codeptr, VX) - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095//+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA fin - codeptr->0 = $20 // JSR abs - codeptr=>1 = *(bytecode+i+1) - codeptr = codeptr + 3 - VY = UNKNOWN - A_IS_TOSL = FALSE - i = i + 2 + codeptr=>0 = $10E2 // SEP #$10 -> 8 BIT X/Y + codeptr->2 = $A9 // LDA #imm + codeptr=>3 = codeptr + 13 + codeptr=>5 = $F285 // STA IP + codeptr->7 = $A0 // LDY #$0000 + codeptr=>8 = $0000 + codeptr->10 = $4C // JMP FETCHOP + codeptr=>11 = $00F1 // FETCHOP + codeptr->13 = $54 // CALL ADDR + codeptr=>14 = *(bytecode+i+1) + codeptr->16 = $C0 // NATV + codeptr = codeptr + 17 + X_IS_IFP = FALSE + A_IS_TOS = FALSE + i = i + 2 break is $56 // ICAL //puts("ICAL") // // Pull address off stack // - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA fin - codeptr=>0 = $E785 // STA $E7:TMPL - codeptr=>2 = $C0B5+(VX<<8) // LDA ESTKH,X - codeptr=>4 = $E885 // STA $E8:TMPH - codeptr, VX = resolveX(codeptr + 6, VX + 1) // INX - // - // Call through TMP - // - codeptr->0 = $20 // JSR abs - codeptr=>1 = $00E6 // $E6:JMPTMP - codeptr = codeptr + 3 - VY = UNKNOWN - A_IS_TOSL = FALSE + codeptr=>0 = $10E2 // SEP #$10 -> 8 BIT X/Y + codeptr->2 = $A9 // LDA #imm + codeptr=>3 = codeptr + 13 + codeptr=>5 = $F285 // STA IP + codeptr->7 = $A0 // LDY #$0000 + codeptr=>8 = $0000 + codeptr->10 = $4C // JMP FETCHOP + codeptr=>11 = $00F1 // FETCHOP + codeptr->13 = $56 // ICAL + codeptr->14 = $C0 // NATV + codeptr = codeptr + 15 + X_IS_IFP = FALSE + A_IS_TOS = FALSE break is $5A // LEAVE i++ @@ -709,336 +618,276 @@ def compiler(defptr)#0 // // Call into VM // - codeptr, VX = resolveX(codeptr, VX) - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095//+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA fin - codeptr->0 = $20 // JSR abs - codeptr=>1 = directentry // INTERP - codeptr=>3 = $5A + (^(bytecode+i)<<8) // LEAVE CODE AND OPERAND - codeptr = codeptr + 5 - A_IS_TOSL = FALSE + codeptr=>0 = $10E2 // SEP #$10 -> 8 BIT X/Y + codeptr->2 = $A9 // LDA #imm + codeptr=>3 = codeptr + 13 + codeptr=>5 = $F285 // STA IP + codeptr->7 = $A0 // LDY #$0000 + codeptr=>8 = $0000 + codeptr->10 = $4C // JMP FETCHOP + codeptr=>11 = $00F1 // FETCHOP + codeptr=>13 = $5A + (^(bytecode+i)<<8) // LEAVE CODE AND OPERAND + codeptr = codeptr + 15 + X_IS_IFP = FALSE + A_IS_TOS = FALSE break is $5C // RET //puts("RET") - codeptr, VX = resolveX(codeptr, VX) - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095//+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA fin - ^codeptr = $60; codeptr++ // RTS - A_IS_TOSL = FALSE + codeptr=>0 = $10E2 // SEP #$10 -> 8 BIT X/Y + codeptr->2 = $A9 // LDA #imm + codeptr=>3 = codeptr + 13 + codeptr=>5 = $F285 // STA IP + codeptr->7 = $A0 // LDY #$0000 + codeptr=>8 = $0000 + codeptr->10 = $4C // JMP FETCHOP + codeptr=>11 = $00F1 // FETCHOP + codeptr->13 = $5C // RET + codeptr = codeptr + 14 + X_IS_IFP = FALSE + A_IS_TOS = FALSE break is $60 // LB //puts("LB") - if VY <> 0 - *codeptr = $00A0 // LDY #$00 - codeptr = codeptr + 2 - VY = 0 + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 - fin - codeptr=>0 = $C095-$0100+(VX<<8) // STA ESTKH-1,X - codeptr=>2 = $C0A1-$0100+(VX<<8) // LDA (ESTKH-1,X) - codeptr=>4 = $C094+(VX<<8) // STY ESTKH,X - codeptr = codeptr + 6 - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + codeptr=>0 = $E685 // STA TMP + codeptr=>2 = $20E2 // SEP #$20 -> 8 BIT ACCUM/MEM + codeptr=>4 = $E6B2 // LDA (TMP) + codeptr=>6 = $20C2 // REP #$20 -> 16 BIT ACCUM/MEM + codeptr->8 = $29 // AND #$00FF + codeptr=>9 = $00FF + codeptr = codeptr + 11 + A_IS_TOS = TRUE // PHA break is $62 // LW //puts("LW") - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - codeptr=>0 = $C095-$0100+(VX<<8) // STA ESTKH-1,X - codeptr=>2 = $C0A1-$0100+(VX<<8) // LDA (ESTKH-1,X) - codeptr=>4 = $D095+(VX<<8) // STA ESTKL,X - codeptr=>6 = $C0F6-$0100+(VX<<8) // INC ESTKH-1,X - codeptr=>8 = $02D0 // BNE +2 - codeptr=>10 = $C0F6+(VX<<8) // INC ESTKH,X - codeptr=>12 = $C0A1-$0100+(VX<<8) // LDA (ESTKH-1,X) - codeptr=>14 = $C095+(VX<<8) // STA ESTKH,X - codeptr = codeptr + 16 - A_IS_TOSL = FALSE + codeptr=>0 = $E685 // STA TMP + codeptr=>4 = $E6B2 // LDA (TMP) + codeptr = codeptr + 6 + A_IS_TOS = TRUE // PHA break is $64 // LLB i++ j = ^(bytecode+i) //puts("LLB "); puti(j) - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA fin - VX-- // DEX - if VY <> j - *codeptr = $A0+(j<<8) // LDY #imm + if not X_IS_IFP + *codeptr = $E0A6 // LDX IFP codeptr = codeptr + 2 + X_IS_IFP = TRUE fin - *codeptr = $E0B1 // LDA (IFP),Y - codeptr = codeptr + 2 - if j <> 0 - *codeptr = $00A0 // LDY #$00 - codeptr = codeptr + 2 - fin - *codeptr = $C094+(VX<<8) // STY ESTKH,X - codeptr = codeptr + 2 - VY = 0 - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + codeptr=>0 = $B5+(J<<8) // LDA dp,X + codeptr->2 = $29 // AND #$00FF + codeptr=>3 = $00FF + codeptr = codeptr + 5 + A_IS_TOS = TRUE // PHA break is $66 // LLW i++ j = ^(bytecode+i) //puts("LLW "); puti(j) - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA fin - VX-- // DEX - if VY <> j - *codeptr = $A0+((j+1)<<8) // LDY #imm + if not X_IS_IFP + *codeptr = $E0A6 // LDX IFP codeptr = codeptr + 2 - VY = j - else - ^codeptr = $C8; codeptr++ // INY + X_IS_IFP = TRUE fin - codeptr=>0 = $E0B1 // LDA (IFP),Y - codeptr=>2 = $C095+(VX<<8) // STA ESTKH,X - codeptr->4 = $88 // DEY - codeptr=>5 = $E0B1 // LDA (IFP),Y - codeptr = codeptr + 7 - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + codeptr=>0 = $B5+(J<<8) // LDA dp,X + codeptr = codeptr + 2 + A_IS_TOS = TRUE // PHA break is $68 // LAB + dest = *(bytecode+i+1) + i = i + 2 + //puts("LAB $"); puth(dest) + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA + fin + codeptr=>0 = $20E2 // SEP #$20 -> 8 BIT ACCUM/MEM + codeptr->2 = $AD // LDA abs + codeptr=>3 = dest + codeptr=>5 = $20C2 // REP #$20 -> 16 BIT ACCUM/MEM + codeptr->7 = $29 // AND #$00FF + codeptr=>8 = $00FF + codeptr = codeptr + 10 + A_IS_TOS = TRUE // PHA + break is $6A // LAW dest = *(bytecode+i+1) i = i + 2 - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + //puts("LAW $"); puth(dest) + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA fin - VX-- // DEX - if opcode == $68 - //puts("LAB $"); puth(dest) - if VY <> 0 - *codeptr = $00A0 // LDY #$00 - codeptr = codeptr + 2 - VY = 0 - fin - *codeptr = $C094+(VX<<8) // STY ESTKH,X - codeptr = codeptr + 2 - else - //puts("LAW $"); puth(dest) - codeptr->0 = $AD // LDA abs+1 - codeptr=>1 = dest+1 - codeptr=>3 = $C095+(VX<<8) // STA ESTKH,X - codeptr = codeptr + 5 - fin - codeptr->0 = $AD // LDA abs + codeptr->0 = $AD // LDA abs codeptr=>1 = dest codeptr = codeptr + 3 - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + A_IS_TOS = TRUE // PHA break is $6C // DLB - i++ - j = ^(bytecode+i) - //puts("DLB "); puti(j) - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 - A_IS_TOSL = TOS_CLEAN - fin - if VY <> j - *codeptr = $A0+(j<<8) // LDY #imm - codeptr = codeptr + 2 - VY = j - fin - *codeptr = $E091 // STA (IFP),Y - codeptr = codeptr + 2 - if VY <> 0 - *codeptr = $00A0 // LDY #$00 - codeptr = codeptr + 2 - VY = 0 - fin - *codeptr = $C094+(VX<<8) // STY ESTKH,X - codeptr = codeptr + 2 - break - is $6E // DLW - i++ - j = ^(bytecode+i) - //puts("DLW "); puti(j) - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 - fin - if VY <> j - *codeptr = $A0+((j+1)<<8) // LDY #imm - codeptr = codeptr + 2 - VY = j - else - ^codeptr = $C8; codeptr++ // INY - fin - codeptr=>0 = $C0B5+(VX<<8) // LDA ESTKH,X - codeptr=>2 = $E091 // STA (IFP),Y - codeptr->4 = $88 // DEY - codeptr=>5 = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr=>7 = $E091 // STA (IFP),Y - codeptr = codeptr + 9 - A_IS_TOSL = TOS_CLEAN - break - is $70 // SB - is $72 // SW - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 - fin - codeptr=>0 = $C095-$0100+(VX<<8) // STA ESTKH-1,X - codeptr=>2 = $D0B5+$0100+(VX<<8) // LDA ESTKL+1,X - codeptr=>4 = $C081-$0100+(VX<<8) // STA (ESTKH-1,X) - if opcode == $70 - //puts("SB") - codeptr = codeptr + 6 - else - //puts("SW") - codeptr=>6 = $C0B5+$0100+(VX<<8) // LDA ESTKH+1,X - codeptr=>8 = $C0F6-$0100+(VX<<8) // INC ESTKH-1,X - codeptr=>10 = $02D0 // BNE +2 - codeptr=>12 = $C0F6+(VX<<8) // INC ESTKH,X - codeptr=>14 = $C081-$0100+(VX<<8) // STA (ESTKH-1,X) - codeptr = codeptr + 16 - fin - VX = VX + 2 // INX; INX - A_IS_TOSL = FALSE - break is $74 // SLB + i++ + j = ^(bytecode+i) + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA + fin + if not X_IS_IFP + *codeptr = $E0A6 // LDX IFP + codeptr = codeptr + 2 + X_IS_IFP = TRUE + fin + codeptr=>0 = $20E2 // SEP #$20 -> 8 BIT ACCUM/MEM + codeptr=>2 = $55+(J<<8) // STA dp,X + codeptr=>4 = $20C2 // REP #$20 -> 16 BIT ACCUM/MEM + if opcode == $6C + //puts("DLB "); puti(j) + codeptr->6 = $29 // AND #$00FF + codeptr=>7 = $00FF + codeptr = codeptr + 9 + A_IS_TOS = TRUE // PHA + else + //puts("SLB "); puti(j) + codeptr = codeptr + 6 + A_IS_TOS = FALSE + fin + break + is $6E // DLW is $76 // SLW i++ j = ^(bytecode+i) - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - if VY <> j - *codeptr = $A0+(j<<8) // LDY #imm + if not X_IS_IFP + *codeptr = $E0A6 // LDX IFP codeptr = codeptr + 2 - VY = j + X_IS_IFP = TRUE fin - codeptr=>0 = $E091 // STA (IFP),Y - if opcode == $74 - //puts("SLB "); puti(j) - codeptr = codeptr + 2 + codeptr=>0 = $55+(J<<8) // STA dp,X + codeptr = codeptr + 2 + if opcode == $6E + //puts("DLW "); puti(j) + A_IS_TOS = TRUE // PHA else //puts("SLW "); puti(j) - codeptr->2 = $C8 // INY - codeptr=>3 = $C0B5+(VX<<8) // LDA ESTKH,X - codeptr=>5 = $E091 // STA (IFP),Y - codeptr = codeptr + 7 - VY++ + A_IS_TOS = FALSE fin - VX++ // INX - A_IS_TOSL = FALSE + break + is $70 // SB + //puts("SB") + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA + fin + codeptr=>0 = $E685 // STA TMP + codeptr->2 = $68 // PLA + codeptr=>3 = $20E2 // SEP #$20 -> 8 BIT ACCUM/MEM + codeptr=>5 = $E692 // STA (TMP) + codeptr=>7 = $20C2 // REP #$20 -> 16 BIT ACCUM/MEM + codeptr = codeptr + 9 + A_IS_TOS = FALSE + break + is $72 // SW + //puts("SW") + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA + fin + codeptr=>0 = $E685 // STA TMP + codeptr->2 = $68 // PLA + codeptr=>3 = $E692 // STA (TMP) + codeptr = codeptr + 5 + A_IS_TOS = FALSE break is $78 // SAB - is $7A // SAW + is $7C // DAB dest = *(bytecode+i+1) i = i + 2 - //puts("SAW $"); puth(dest) - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - codeptr->0 = $8D // STA abs - codeptr=>1 = dest - if opcode == $78 + codeptr=>0 = $20E2 // SEP #$20 -> 8 BIT ACCUM/MEM + codeptr->2 = $8D // STA abs + codeptr=>3 = dest + codeptr=>5 = $20C2 // REP #$20 -> 16 BIT ACCUM/MEM + if opcode == $78 //puts("SAB $"); puth(*(bytecode+i)) - codeptr = codeptr + 3 + codeptr = codeptr + 7 + A_IS_TOS = FALSE else - codeptr=>3 = $C0B5+(VX<<8) // LDA ESTKH,X - codeptr->5 = $8D // STA abs+1 - codeptr=>6 = dest+1 - codeptr = codeptr + 8 + //puts("DAB $"); puth(*(bytecode+i)) + codeptr->7 = $29 // AND #$00FF + codeptr=>8 = $00FF + codeptr = codeptr + 10 + A_IS_TOS = TRUE fin - VX++ // INX - A_IS_TOSL = FALSE break - is $7C // DAB + is $7A // SAW is $7E // DAW dest = *(bytecode+i+1) i = i + 2 - //puts("DAW $"); puth(*(bytecode+i)) - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 - A_IS_TOSL = TOS_CLEAN + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - codeptr->0 = $8D // STA abs + codeptr->0 = $8D // STA abs codeptr=>1 = dest - if opcode == $7C - //puts("DAB $"); puth(*(bytecode+i)) - codeptr = codeptr + 3 - if VY <> 0 - *codeptr = $00A0 // LDY #$00 - codeptr = codeptr + 2 - VY = 0 - fin - *codeptr = $C094+(VX<<8) // STY ESTKH,X - codeptr = codeptr + 2 + codeptr = codeptr + 3 + if opcode == $7A + //puts("SAW $"); puth(dest) + A_IS_TOS = FALSE else - codeptr=>3 = $C0B4+(VX<<8) // LDY ESTKH,X - codeptr->5 = $8C // STY abs+1 - codeptr=>6 = dest+1 - codeptr = codeptr + 8 - VY = UNKNOWN + //puts("DAW $"); puth(*(bytecode+i)) + A_IS_TOS = TRUE fin break is $80 // NOT //puts("NOT") - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 + if not A_IS_TOS + codeptr->0 = $68 // PLA + else + codeptr->0 = $A8 // TAY fin - codeptr=>0 = $C015+(VX<<8) // ORA ESTKH,X - codeptr=>2 = $02F0 // BEQ +2 - codeptr=>4 = $FFA9 // LDA #$FF - codeptr=>6 = $FF49 // EOR #$FF - codeptr=>8 = $C095+(VX<<8) // STA ESTKH,X - codeptr = codeptr + 10 - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + codeptr=>1 = $03F0 // BEQ +3 + codeptr->3 = $A9 // LDA #$FFFF + codeptr=>4 = $FFFF + codeptr->6 = $49 // EOR #$FFFF + codeptr=>7 = $FFFF + codeptr = codeptr + 9 + A_IS_TOS = TRUE break is $82 // ADD //puts("ADD") - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - codeptr->0 = $18 // CLC - codeptr=>1 = $D075+$0100+(VX<<8) // ADC ESTKL+1,X - codeptr=>3 = $D095+$0100+(VX<<8) // STA ESTKL+1,X - codeptr=>5 = $C0B5+(VX<<8) // LDA ESTKH,X - codeptr=>7 = $C075+$0100+(VX<<8) // ADC ESTKH+1,X - codeptr=>9 = $C095+$0100+(VX<<8) // STA ESTKH+1,X - codeptr = codeptr + 11 - VX++ // INX - A_IS_TOSL = FALSE + codeptr->0 = $18 // CLC + codeptr=>1 = $63+(TOS<<8) // ADC S,TOS + codeptr->3 = $7A // PLY + codeptr = codeptr + 4 + A_IS_TOS = TRUE break is $84 // SUB //puts("SUB") - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - codeptr=>0 = $D0B5+$0100+(VX<<8) // LDA ESTKL+1,X - codeptr->2 = $38 // SEC - codeptr=>3 = $D0F5+(VX<<8) // SBC ESTKL,X - codeptr=>5 = $D095+$0100+(VX<<8) // STA ESTKL+1,X - codeptr=>7 = $C0B5+$0100+(VX<<8) // LDA ESTKH+1,X - codeptr=>9 = $C0F5+(VX<<8) // SBC ESTKH,X - codeptr=>11 = $C095+$0100+(VX<<8) // STA ESTKH+1,X - codeptr = codeptr + 13 - VX++ // INX - A_IS_TOSL = FALSE + codeptr=>0 = $E685 // STA TMP + codeptr=>2 = $3868 // PLA; SEC + codeptr=>4 = $E6E5 // SBC TMP + codeptr = codeptr + 6 + A_IS_TOS = TRUE break is $86 // MUL is $88 // DIV @@ -1061,161 +910,137 @@ def compiler(defptr)#0 // // Call into VM // - codeptr, VX = resolveX(codeptr, VX) - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095//+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA fin - codeptr->0 = $20 // JSR INTERP - codeptr=>1 = directentry // INTERP - codeptr=>3 = $C000+opcode // OPCODE; NATV CODE - codeptr = codeptr + 5 - VY = UNKNOWN - A_IS_TOSL = FALSE + codeptr=>0 = $10E2 // SEP #$10 -> 8 BIT X/Y + codeptr->2 = $A9 // LDA #imm + codeptr=>3 = codeptr + 13 + codeptr=>5 = $F285 // STA IP + codeptr->7 = $A0 // LDY #$0000 + codeptr=>8 = $0000 + codeptr->10 = $4C // JMP FETCHOP + codeptr=>11 = $00F1 // FETCHOP + codeptr=>13 = $C000+opcode // OPCODE; NATV CODE + codeptr = codeptr + 15 + X_IS_IFP = FALSE + A_IS_TOS = FALSE break is $90 // NEG //puts("NEG") - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - if VY <> 0 - *codeptr = $00A0 // LDY #$00 - codeptr = codeptr + 2 - VY = 0 - fin - codeptr=>0 = $3898 // TYA -> LDA #$00; SEC - codeptr=>2 = $D0F5+(VX<<8) // SBC ESTKL,X - codeptr=>4 = $D095+(VX<<8) // STA ESTKL,X - codeptr->6 = $98 // TYA -> LDA #00 - codeptr=>7 = $C0F5+(VX<<8) // SBC ESTKH,X - codeptr=>9 = $C095+(VX<<8) // STA ESTKH,X - codeptr = codeptr + 11 - A_IS_TOSL = FALSE + codeptr->0 = $49 // EOR #$FFFF + codeptr=>1 = $FFFF + codeptr->3 = $1A // INC A + codeptr = codeptr + 4 + A_IS_TOS = TRUE break is $92 // COMP //puts("COMP") - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - codeptr=>0 = $FF49 // EOR #$FF - codeptr=>2 = $D095+(VX<<8) // STA ESTKL,X - codeptr=>4 = $C0B5+(VX<<8) // LDA ESTKH,X - codeptr=>6 = $FF49 // EOR #$FF - codeptr=>8 = $C095+(VX<<8) // STA ESTKH,X - codeptr = codeptr + 10 - A_IS_TOSL = FALSE + codeptr->0 = $49 // EOR #$FFFF + codeptr=>1 = $FFFF + codeptr = codeptr + 3 + A_IS_TOS = TRUE break is $94 // AND - is $96 // OR - is $98 // XOR - when opcode - is $94 - //puts("AND") - j = $35 - break - is $96 - //puts("OR") - j = $15 - break - is $98 - //puts("XOR") - j = $55 - wend - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 + //puts("AND") + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - codeptr->0 = j // OP - codeptr->1 = $D0+$01+VX // ESTKL+1,X - codeptr=>2 = $D095+$0100+(VX<<8) // STA ESTKL+1,X - codeptr=>4 = $C0B5+(VX<<8) // LDA ESTKH,X - codeptr->6 = j // OP - codeptr->7 = $C0+$01+VX // ESTKH+1,X - codeptr=>8 = $C095+$0100+(VX<<8) // STA ESTKH+1,X - codeptr = codeptr + 10 - VX++ // INX - A_IS_TOSL = FALSE + codeptr=>0 = $23+(TOS<<8) // AND S,TOS + codeptr->2 = $7A // PLY + codeptr = codeptr + 3 + A_IS_TOS = TRUE + break + is $96 // OR + //puts("OR") + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA + fin + codeptr=>0 = $03+(TOS<<8) // OR S,TOS + codeptr->2 = $7A // PLY + codeptr = codeptr + 3 + A_IS_TOS = TRUE + break + is $98 // XOR + //puts("XOR") + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA + fin + codeptr=>0 = $43+(TOS<<8) // EOR S,TOS + codeptr->2 = $7A // PLY + codeptr = codeptr + 3 + A_IS_TOS = TRUE break is $9E // IDXW //puts("IDXW") - if not A_IS_TOSL - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - codeptr->0 = $0A // ASL - codeptr=>1 = $C036+(VX<<8) // ROL ESTKH,X - codeptr->3 = $18 // CLC - codeptr=>4 = $D075+$0100+(VX<<8) // ADC ESTKL+1,X - codeptr=>6 = $D095+$0100+(VX<<8) // STA ESTKL+1,X - codeptr=>8 = $C0B5+(VX<<8) // LDA ESTKH,X - codeptr=>10 = $C075+$0100+(VX<<8) // ADC ESTKH+1,X - codeptr=>12 = $C095+$0100+(VX<<8) // STA ESTKH+1,X - codeptr = codeptr + 14 - VX++ // INX - A_IS_TOSL = FALSE + codeptr=>0 = $180A // ASL; CLC + codeptr=>2 = $63+(TOS<<8) // ADC S,TOS + codeptr->4 = $7A // PLY + codeptr = codeptr + 5 + A_IS_TOS = TRUE break is $A0 // BRGT - FOR/NEXT SPECIFIC TEST & BRANCH i++ dest = i + *(bytecode+i) i++ //puts("BRGT "); puti(dest) - codeptr, VX = resolveX(codeptr, VX) - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095//+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA fin - codeptr=>0 = $D0B5+$0100//+(VX<<8) // LDA ESTKL+1,X - codeptr=>2 = $D0D5//+(VX<<8) // CMP ESTKL,X - codeptr=>4 = $C0B5+$0100//+(VX<<8) // LDA ESTKH+1,X - codeptr=>6 = $C0F5//+(VX<<8) // SBC ESTKH - codeptr=>8 = $0250 // BVC +2 - codeptr=>10 = $8049 // EOR #$80 - codeptr=>12 = $0510 // BPL +5 - codeptr=>14 = $E8E8 // INX; INX - codeptr->16 = $4C // JMP abs - codeptr=>17 = addrxlate=>[dest] - if not (codeptr->18 & $80) // Unresolved address list - addrxlate=>[dest] = codeptr + 17 - *jitcodeptr + codeptr=>0 = $A3+(NOS<<8) // LDA S,NOS + codeptr->2 = $38 // SEC + codeptr=>3 = $E3+(TOS<<8) // SBC S,TOS + codeptr=>5 = $0250 // BVC +3 + codeptr->7 = $49 // EOR #$8000 + codeptr=>8 = $8000 + codeptr=>10 = $0510 // BPL +5 + codeptr=>12 = $6868 // PLA; PLA + codeptr->14 = $4C // JMP abs + codeptr=>15 = addrxlate=>[dest] + if not (codeptr->16 & $80) // Unresolved address list + addrxlate=>[dest] = codeptr + 15 - *jitcodeptr fin - codeptr = codeptr + 19 - A_IS_TOSL = FALSE + codeptr = codeptr + 17 + A_IS_TOS = FALSE break is $A2 // BRLT - FOR/NEXT SPECIFIC TEST & BRANCH i++ dest = i + *(bytecode+i) i++ //puts("BRLT "); puti(dest) - codeptr, VX = resolveX(codeptr, VX) - if not A_IS_TOSL - *codeptr = $D0B5//+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 - elsif A_IS_TOSL & TOS_DIRTY - *codeptr = $D095//+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS + ^codeptr = $48; codeptr++ // PHA fin - codeptr=>0 = $D0D5+$0100//+(VX<<8) // CMP ESTKL+1,X - codeptr=>2 = $C0B5//+(VX<<8) // LDA ESTKH,X - codeptr=>4 = $C0F5+$0100//+(VX<<8) // SBC ESTKH+1 - codeptr=>6 = $0250 // BVC +2 - codeptr=>8 = $8049 // EOR #$80 - codeptr=>10 = $0510 // BPL +5 - codeptr=>12 = $E8E8 // INX; INX - codeptr->14 = $4C // JMP abs - codeptr=>15 = addrxlate=>[dest] - if not (codeptr->16 & $80) // Unresolved address list - addrxlate=>[dest] = codeptr + 15 - *jitcodeptr + codeptr->0 = $38 // SEC + codeptr=>1 = $E3+(NOS<<8) // SBC S,NOS + codeptr=>3 = $0250 // BVC +3 + codeptr->5 = $49 // EOR #$8000 + codeptr=>6 = $8000 + codeptr=>8 = $0510 // BPL +5 + codeptr=>10 = $6868 // PLA; PLA + codeptr->12 = $4C // JMP abs + codeptr=>13 = addrxlate=>[dest] + if not (codeptr->14 & $80) // Unresolved address list + addrxlate=>[dest] = codeptr + 13 - *jitcodeptr fin - codeptr = codeptr + 17 - A_IS_TOSL = FALSE - break + codeptr = codeptr + 15 + A_IS_TOS = FALSE + break is $A4 // INCBRLE - FOR/NEXT SPECIFIC INC & TEST & BRANCH is $A6 // ADDBRLE - FOR/NEXT SPECIFIC ADD & TEST & BRANCH i++ dest = i + *(bytecode+i) i++ - if not A_IS_TOSL + if not A_IS_TOS *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X codeptr = codeptr + 2 fin @@ -1260,23 +1085,22 @@ def compiler(defptr)#0 fin codeptr = codeptr + 17 VX = VX + 2 // INX; INX - A_IS_TOSL = FALSE + A_IS_TOS = FALSE break is $A8 // DECBRGR - FOR/NEXT SPECIFIC DEC & TEST & BRANCH is $AA // SUBBRGE - FOR/NEXT SPECIFIC SUB & TEST & BRANCH i++ dest = i + *(bytecode+i) i++ - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS & TOS_DIRTY + ^codeptr = $48; codeptr++ // PHA fin if opcode == $A8 // // DECR // //puts("DECBRGE "); puti(dest) - if not A_IS_TOSL + if not A_IS_TOS *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X codeptr = codeptr + 2 fin @@ -1291,7 +1115,7 @@ def compiler(defptr)#0 // SUB // //puts("SUBBRGE "); puti(dest) - if A_IS_TOSL & TOS_DIRTY + if A_IS_TOS & TOS_DIRTY *codeptr = $D095+(VX<<8) // STA ESTKL,X codeptr = codeptr + 2 fin @@ -1322,7 +1146,7 @@ def compiler(defptr)#0 fin codeptr = codeptr + 15 VX = VX + 2 // INX; INX - A_IS_TOSL = FALSE + A_IS_TOS = FALSE break is $AC // BRAND - LOGICAL AND SPECIFIC BRANCH is $AE // BROR - LOGICAL OR SPECIFIC BRANCH @@ -1330,12 +1154,11 @@ def compiler(defptr)#0 dest = i + *(bytecode+i) i++ codeptr, VX = resolveX(codeptr, VX) - if not A_IS_TOSL + if not A_IS_TOS *codeptr = $D0B5//+(VX<<8) // LDA ESTKL,X codeptr = codeptr + 2 - elsif A_IS_TOSL & TOS_DIRTY - *codeptr = $D095//+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + elsif A_IS_TOS & TOS_DIRTY + ^codeptr = $48; codeptr++ // PHA fin codeptr=>0 = $C015//+(VX<<8) // ORA ESTKH,X if opcode == $AC @@ -1352,13 +1175,13 @@ def compiler(defptr)#0 fin codeptr = codeptr + 7 VX++ // INX - A_IS_TOSL = FALSE + A_IS_TOS = FALSE break is $B0 // ADDLB is $B2 // ADDLW i++ j = ^(bytecode+i) - if not A_IS_TOSL + if not A_IS_TOS *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X codeptr = codeptr + 2 fin @@ -1374,7 +1197,7 @@ def compiler(defptr)#0 codeptr=>3 = $0290 // BCC +2 codeptr=>5 = $C0F6+(VX<<8) // INC ESTKH,X codeptr = codeptr + 7 - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + A_IS_TOS = TOS_DIRTY // STA ESTKL,X else //puts("ADDLW "); puti(j) codeptr=>3 = $D095+(VX<<8) // STA ESTKL,X @@ -1384,14 +1207,14 @@ def compiler(defptr)#0 codeptr=>10 = $C095+(VX<<8) // STA ESTKH,X codeptr = codeptr + 12 VY++ - A_IS_TOSL = FALSE + A_IS_TOS = FALSE fin break is $B4 // ADDAB is $B6 // ADDAW dest = *(bytecode+i+1) i = i + 2 - if not A_IS_TOSL + if not A_IS_TOS *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X codeptr = codeptr + 2 fin @@ -1402,7 +1225,7 @@ def compiler(defptr)#0 codeptr=>4 = $0290 // BCC +2 codeptr=>6 = $C0F6+(VX<<8) // INC ESTKH,X codeptr = codeptr + 8 - A_IS_TOSL = TOS_DIRTY // STA ESTKL,X + A_IS_TOS = TOS_DIRTY // STA ESTKL,X else //puts("ADDAW $"); puth(dest) codeptr=>4 = $D095+(VX<<8) // STA ESTKL,X @@ -1411,16 +1234,15 @@ def compiler(defptr)#0 codeptr=>9 = dest+1 codeptr=>11 = $C095+(VX<<8) // STA ESTKH,X codeptr = codeptr + 13 - A_IS_TOSL = FALSE + A_IS_TOS = FALSE fin break is $B8 // IDXLB i++ j = ^(bytecode+i) //puts("IDXLB "); puti(j) - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS & TOS_DIRTY + ^codeptr = $48; codeptr++ // PHA fin if VY <> j *codeptr = $A0+(j<<8) // LDY #imm @@ -1442,15 +1264,14 @@ def compiler(defptr)#0 codeptr=>12 = $C095+(VX<<8) // STA ESTKH,X codeptr = codeptr + 14 VY = UNKNOWN - A_IS_TOSL = FALSE + A_IS_TOS = FALSE break is $BA // IDXLW i++ j = ^(bytecode+i) //puts("IDXLW "); puti(j) - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS & TOS_DIRTY + ^codeptr = $48; codeptr++ // PHA fin if VY <> j *codeptr = $A0+(j<<8) // LDY #imm @@ -1471,15 +1292,14 @@ def compiler(defptr)#0 codeptr=>20 = $C095+(VX<<8) // STA ESTKH,X codeptr = codeptr + 22 VY = UNKNOWN - A_IS_TOSL = FALSE + A_IS_TOS = FALSE break is $BC // IDXAB dest = *(bytecode+i+1) i = i + 2 //puts("IDXAB $"); puth(*(bytecode+i)) - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS & TOS_DIRTY + ^codeptr = $48; codeptr++ // PHA fin if VY <> 0 *codeptr = $00A0 // LDY #$00 @@ -1497,15 +1317,14 @@ def compiler(defptr)#0 codeptr=>15 = $C095+(VX<<8) // STA ESTKH,X codeptr = codeptr + 17 VY = UNKNOWN - A_IS_TOSL = FALSE + A_IS_TOS = FALSE break is $BE // IDXAW dest = *(bytecode+i+1) i = i + 2 //puts("IDXAW $"); puth(dest) - if A_IS_TOSL & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 + if A_IS_TOS & TOS_DIRTY + ^codeptr = $48; codeptr++ // PHA fin codeptr->0 = $AD // LDA abs codeptr=>1 = dest @@ -1523,7 +1342,7 @@ def compiler(defptr)#0 codeptr=>21 = $C095+(VX<<8) // STA ESTKH,X codeptr = codeptr + 23 VY = UNKNOWN - A_IS_TOSL = FALSE + A_IS_TOS = FALSE break is $FE // NOPed out earlier by SELect break diff --git a/src/libsrc/jitcore.pla b/src/libsrc/jitcore.pla index ccfc336..788b57b 100644 --- a/src/libsrc/jitcore.pla +++ b/src/libsrc/jitcore.pla @@ -315,7 +315,7 @@ def compiler(defptr)#0 VX-- // DEX if VY == j ^codeptr = $98; codeptr++ // TYA -> LDA #imm - + else *codeptr = $A9+(j<<8) // LDA #imm codeptr = codeptr + 2 @@ -944,7 +944,6 @@ def compiler(defptr)#0 is $7A // SAW dest = *(bytecode+i+1) i = i + 2 - //puts("SAW $"); puth(dest) if not A_IS_TOSL *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X codeptr = codeptr + 2 @@ -952,9 +951,10 @@ def compiler(defptr)#0 codeptr->0 = $8D // STA abs codeptr=>1 = dest if opcode == $78 - //puts("SAB $"); puth(*(bytecode+i)) + //puts("SAB $"); puth(dest) codeptr = codeptr + 3 else + //puts("SAW $"); puth(dest) codeptr=>3 = $C0B5+(VX<<8) // LDA ESTKH,X codeptr->5 = $8D // STA abs+1 codeptr=>6 = dest+1 @@ -967,7 +967,6 @@ def compiler(defptr)#0 is $7E // DAW dest = *(bytecode+i+1) i = i + 2 - //puts("DAW $"); puth(*(bytecode+i)) if not A_IS_TOSL *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X codeptr = codeptr + 2 @@ -976,7 +975,7 @@ def compiler(defptr)#0 codeptr->0 = $8D // STA abs codeptr=>1 = dest if opcode == $7C - //puts("DAB $"); puth(*(bytecode+i)) + //puts("DAB $"); puth(dest) codeptr = codeptr + 3 if VY <> 0 *codeptr = $00A0 // LDY #$00 @@ -986,6 +985,7 @@ def compiler(defptr)#0 *codeptr = $C094+(VX<<8) // STY ESTKH,X codeptr = codeptr + 2 else + //puts("DAW $"); puth(dest) codeptr=>3 = $C0B4+(VX<<8) // LDY ESTKH,X codeptr->5 = $8C // STY abs+1 codeptr=>6 = dest+1 diff --git a/src/vmsrc/apple/plvm802.s b/src/vmsrc/apple/plvm802.s index f68bd33..706d8cc 100644 --- a/src/vmsrc/apple/plvm802.s +++ b/src/vmsrc/apple/plvm802.s @@ -84,6 +84,14 @@ NOS = $03 ; TOS-1 REP #$20 ; 16 BIT A/M !AL } + !MACRO INDEX8 { + SEP #$10 ; 8 BIT X/Y + !AS + } + !MACRO INDEX16 { + REP #$10 ; 16 BIT X/Y + !AL + } ;****************************** ;* * ;* INTERPRETER INITIALIZATION * @@ -460,7 +468,7 @@ PAGE0 = * !PSEUDOPC DROP { PLA ; DROP @ $EF INY ; NEXTOP @ $F0 - LDX $FFFF,Y ; FETCHOP @ $F3, IP MAPS OVER $FFFF @ $F4 + LDX $FFFF,Y ; FETCHOP @ $F1, IP MAPS OVER $FFFF @ $F2 JMP (OPTBL,X) ; OPIDX AND OPPAGE MAP OVER OPTBL } PAGE3 = * @@ -1981,57 +1989,13 @@ RET SEC ; SWITCH TO EMULATION MODE PLP RTS ;* -;* RETURN TO NATIVE CODE (EMULATION MODE FOR NOW, ACTUALLY) +;* RETURN TO NATIVE CODE ;* NATV TYA ; FLATTEN IP SEC ADC IP STA IP - SEC ; SWITCH TO EMULATION MODE - XCE - !AS - ;+ACCMEM8 ; 8 BIT A/M - TSC ; MOVE HW EVAL STACK TO ZP EVAL STACK - EOR #$FF - SEC - ADC HWSP ; STACK DEPTH = (HWSP - SP)/2 - LSR -!IF DEBUG { - PHA - CLC - ADC #$80+'0' - STA $7D0+31 - PLA -} - EOR #$FF - SEC - ADC ESP ; ESP - STACK DEPTH - TAX - CPX ESP - BEQ ++ - TAY -- PLA - STA ESTKL,X - PLA - STA ESTKH,X - INX - CPX ESP - BNE - -!IF DEBUG { - TSX - CPX HWSP - BEQ + - LDX #$80+'V' - STX $7D0+30 -- LDX $C000 - BPL - - LDX $C010 -+ -} - TYX -++ LDA PSR - PHA - PLP + +INDEX16 ; SET 16 BIT X/Y JMP (IP) !IF DEBUG { ;***************** From 11ee2feed5e828e8e757fa92adf3e2c188d612e2 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Tue, 10 Apr 2018 21:02:48 -0700 Subject: [PATCH 09/74] JIT16 WIP --- src/libsrc/jit16core.pla | 341 ++++++++++++++++----------------------- 1 file changed, 142 insertions(+), 199 deletions(-) diff --git a/src/libsrc/jit16core.pla b/src/libsrc/jit16core.pla index bcb1e98..d8bde74 100644 --- a/src/libsrc/jit16core.pla +++ b/src/libsrc/jit16core.pla @@ -1041,308 +1041,251 @@ def compiler(defptr)#0 dest = i + *(bytecode+i) i++ if not A_IS_TOS - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 + ^codeptr = $68; codeptr++ // PLA fin if opcode == $A4 // // INCR // //puts("INCBRLE "); puti(dest) - codeptr->0 = $18 // CLC - codeptr=>1 = $0169 // ADC #$01 - codeptr=>3 = $D095+(VX<<8) // STA ESTKL,X - codeptr=>5 = $0290 // BCC +2 - codeptr=>7 = $C0F6+(VX<<8) // INC ESTKH,X - codeptr, VX = resolveX(codeptr + 9, VX) + codeptr=>0 = $481A // INC A; PHA + codeptr = codeptr + 2 else // // ADD // //puts("ADDBRLE "); puti(dest) - codeptr->0 = $18 // CLC - codeptr=>1 = $D075+$0100+(VX<<8) // ADC ESTKL+1,X - codeptr=>3 = $D095+$0100+(VX<<8) // STA ESTKL+1,X - codeptr=>5 = $C0B5+(VX<<8) // LDA ESTKH,X - codeptr=>7 = $C075+$0100+(VX<<8) // ADC ESTKH+1,X - codeptr=>9 = $C095+$0100+(VX<<8) // STA ESTKH+1,X - codeptr, VX = resolveX(codeptr + 11, VX + 1) // INX + codeptr->0 = $18 // CLC + codeptr=>1 = $63+(TOS<<8) // ADC S,TOS + codeptr=>3 = $83+(TOS<<8) // STA S,TOS + codeptr = codeptr + 5 fin // // BRLE // - codeptr=>0 = $D0B5+$0100//+(VX<<8) // LDA ESTKL+1,X - codeptr=>2 = $D0D5//+(VX<<8) // CMP ESTKL,X - codeptr=>4 = $C0B5+$0100//+(VX<<8) // LDA ESTKH+1,X - codeptr=>6 = $C0F5//+(VX<<8) // SBC ESTKH - codeptr=>8 = $0250 // BVC +2 - codeptr=>10 = $8049 // EOR #$80 - codeptr=>12 = $0330 // BMI +3 - codeptr->14 = $4C // JMP abs - codeptr=>15 = addrxlate=>[dest] - if not (codeptr->16 & $80) // Unresolved address list - addrxlate=>[dest] = codeptr + 15 - *jitcodeptr + codeptr=>0 = $A3+(NOS<<8) // LDA S,NOS + codeptr->2 = $38 // SEC + codeptr=>3 = $E3+(TOS<<8) // SBC S,TOS + codeptr=>5 = $0250 // BVC +3 + codeptr->7 = $49 // EOR #$8000 + codeptr=>8 = $8000 + codeptr=>10 = $0330 // BMI +3 + codeptr->12 = $4C // JMP abs + codeptr=>13 = addrxlate=>[dest] + if not (codeptr->14 & $80) // Unresolved address list + addrxlate=>[dest] = codeptr + 13 - *jitcodeptr fin + codeptr=>15 = $6868 // PLA; PLA codeptr = codeptr + 17 - VX = VX + 2 // INX; INX - A_IS_TOS = FALSE + A_IS_TOS = FALSE break is $A8 // DECBRGR - FOR/NEXT SPECIFIC DEC & TEST & BRANCH is $AA // SUBBRGE - FOR/NEXT SPECIFIC SUB & TEST & BRANCH i++ dest = i + *(bytecode+i) i++ - if A_IS_TOS & TOS_DIRTY - ^codeptr = $48; codeptr++ // PHA + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin if opcode == $A8 // // DECR // //puts("DECBRGE "); puti(dest) - if not A_IS_TOS - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 - fin - codeptr->0 = $38 // SEC - codeptr=>1 = $01E9 // SBC #$01 - codeptr=>3 = $D095+(VX<<8) // STA ESTKL,X - codeptr=>5 = $02B0 // BCS +2 - codeptr=>7 = $C0D6+(VX<<8) // DEC ESTKH,X - codeptr, VX = resolveX(codeptr + 9, VX) + codeptr=>0 = $483A // DEC A; PHA + codeptr = codeptr + 2 else // // SUB // //puts("SUBBRGE "); puti(dest) - if A_IS_TOS & TOS_DIRTY - *codeptr = $D095+(VX<<8) // STA ESTKL,X - codeptr = codeptr + 2 - fin - codeptr=>0 = $D0B5+$0100+(VX<<8) // LDA ESTKL+1,X - codeptr->2 = $38 // SEC - codeptr=>3 = $D0F5+(VX<<8) // SBC ESTKL,X - codeptr=>5 = $D095+$0100+(VX<<8) // STA ESTKL+1,X - codeptr=>7 = $C0B5+$0100+(VX<<8) // LDA ESTKH+1,X - codeptr=>9 = $C0F5+(VX<<8) // SBC ESTKH,X - codeptr=>11 = $C095+$0100+(VX<<8) // STA ESTKH+1,X - codeptr, VX = resolveX(codeptr + 13, VX + 1) // INX - *codeptr = $D0B5//+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 + codeptr=>0 = $E685 // STA TMP + codeptr=>2 = $A3+(TOS<<8) // LDA S,TOS + codeptr->4 = $68 // SEC + codeptr=>5 = $E6E5 // SBC TMP + codeptr=>3 = $83+(TOS<<8) // STA S,TOS + codeptr = codeptr + 6 fin // // BRGE // - codeptr=>0 = $D0D5+$0100//+(VX<<8) // CMP ESTKL+1,X - codeptr=>2 = $C0B5//+(VX<<8) // LDA ESTKH,X - codeptr=>4 = $C0F5+$0100//+(VX<<8) // SBC ESTKH+1,X - codeptr=>6 = $0250 // BVC +2 - codeptr=>8 = $8049 // EOR #$80 - codeptr=>10 = $0330 // BMI +3 - codeptr->12 = $4C // JMP abs - codeptr=>13 = addrxlate=>[dest] - if not (codeptr->14 & $80) // Unresolved address list - addrxlate=>[dest] = codeptr + 13 - *jitcodeptr + codeptr->0 = $38 // SEC + codeptr=>1 = $E3+(NOS<<8) // SBC S,NOS + codeptr=>3 = $0250 // BVC +3 + codeptr->5 = $49 // EOR #$8000 + codeptr=>6 = $8000 + codeptr=>8 = $0330 // BMI +3 + codeptr->10 = $4C // JMP abs + codeptr=>11 = addrxlate=>[dest] + if not (codeptr->12 & $80) // Unresolved address list + addrxlate=>[dest] = codeptr + 11 - *jitcodeptr fin + codeptr=>13 = $6868 // PLA; PLA codeptr = codeptr + 15 - VX = VX + 2 // INX; INX - A_IS_TOS = FALSE + A_IS_TOS = FALSE break is $AC // BRAND - LOGICAL AND SPECIFIC BRANCH is $AE // BROR - LOGICAL OR SPECIFIC BRANCH i++ dest = i + *(bytecode+i) i++ - codeptr, VX = resolveX(codeptr, VX) if not A_IS_TOS - *codeptr = $D0B5//+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 - elsif A_IS_TOS & TOS_DIRTY - ^codeptr = $48; codeptr++ // PHA + codeptr->0 = $68 // PLA + else + codeptr->0 = $A8 // TAY fin - codeptr=>0 = $C015//+(VX<<8) // ORA ESTKH,X if opcode == $AC //puts("BRAND "); puti(dest) - codeptr=>2 = $03D0 // BNE +3 + codeptr=>1 = $03D0 // BNE +3 else //puts("BROR "); puti(dest) - codeptr=>2 = $03F0 // BEQ +3 + codeptr=>1 = $03F0 // BEQ +3 fin - codeptr->4 = $4C // JMP abs + codeptr=>3 = $4C48 // PHA; JMP abs codeptr=>5 = addrxlate=>[dest] if not (codeptr->6 & $80) // Unresolved address list addrxlate=>[dest] = codeptr + 5 - *jitcodeptr fin - codeptr = codeptr + 7 - VX++ // INX - A_IS_TOS = FALSE + codeptr = codeptr + 7 + A_IS_TOS = FALSE break is $B0 // ADDLB - is $B2 // ADDLW + //puts("ADDLB "); puti(j) i++ j = ^(bytecode+i) if not A_IS_TOS - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 + ^codeptr = $68; codeptr++ // PLA fin - if VY <> j - *codeptr = $A0+(j<<8) // LDY #imm + if not X_IS_IFP + *codeptr = $E0A6 // LDX IFP codeptr = codeptr + 2 - VY = j + X_IS_IFP = TRUE fin - codeptr->0 = $18 // CLC - codeptr=>1 = $E071 // ADC (IFP),Y - if opcode == $B0 - //puts("ADDLB "); puti(j) - codeptr=>3 = $0290 // BCC +2 - codeptr=>5 = $C0F6+(VX<<8) // INC ESTKH,X - codeptr = codeptr + 7 - A_IS_TOS = TOS_DIRTY // STA ESTKL,X - else + codeptr=>0 = $E685 // STA TMP + codeptr=>2 = $B5+(J<<8) // LDA dp,X + codeptr->4 = $29 // AND #$00FF + codeptr=>5 = $00FF + codeptr->7 = $18 // CLC + codeptr=>8 = $E665 // ADC TMP + codeptr = codeptr + 10 + A_IS_TOS = TRUE // PHA + break + is $B2 // ADDLW + i++ + j = ^(bytecode+i) //puts("ADDLW "); puti(j) - codeptr=>3 = $D095+(VX<<8) // STA ESTKL,X - codeptr=>5 = $C0B5+(VX<<8) // LDA ESTKH,X - codeptr->7 = $C8 // INY - codeptr=>8 = $E071 // ADC (IFP),Y - codeptr=>10 = $C095+(VX<<8) // STA ESTKH,X - codeptr = codeptr + 12 - VY++ - A_IS_TOS = FALSE + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin + if not X_IS_IFP + *codeptr = $E0A6 // LDX IFP + codeptr = codeptr + 2 + X_IS_IFP = TRUE + fin + codeptr->0 = $18 // CLC + codeptr=>1 = $75+(J<<8) // ADC dp,X + codeptr = codeptr + 3 + A_IS_TOS = TRUE // PHA break is $B4 // ADDAB + dest = *(bytecode+i+1) + i = i + 2 + //puts("ADDAB $"); puth(dest) + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA + fin + codeptr=>0 = $E685 // STA TMP + codeptr=>2 = $20E2 // SEP #$20 -> 8 BIT ACCUM/MEM + codeptr->4 = $AD // LDA abs + codeptr=>5 = dest + codeptr=>7 = $20C2 // REP #$20 -> 16 BIT ACCUM/MEM + codeptr->9 = $29 // AND #$00FF + codeptr=>10 = $00FF + codeptr->12 = $18 // CLC + codeptr=>13 = $E665 // ADC TMP + codeptr = codeptr + 15 + A_IS_TOS = TRUE // PHA + break is $B6 // ADDAW dest = *(bytecode+i+1) i = i + 2 if not A_IS_TOS - *codeptr = $D0B5+(VX<<8) // LDA ESTKL,X - codeptr = codeptr + 2 + ^codeptr = $68; codeptr++ // PLA fin - codeptr=>0 = $6D18 // CLC; ADC abs + codeptr=>0 = $6D18 // CLC; ADC abs codeptr=>2 = dest - if opcode == $B4 - //puts("ADDAB $"); puth(dest) - codeptr=>4 = $0290 // BCC +2 - codeptr=>6 = $C0F6+(VX<<8) // INC ESTKH,X - codeptr = codeptr + 8 - A_IS_TOS = TOS_DIRTY // STA ESTKL,X - else - //puts("ADDAW $"); puth(dest) - codeptr=>4 = $D095+(VX<<8) // STA ESTKL,X - codeptr=>6 = $C0B5+(VX<<8) // LDA ESTKH,X - codeptr->8 = $6D // ADC abs - codeptr=>9 = dest+1 - codeptr=>11 = $C095+(VX<<8) // STA ESTKH,X - codeptr = codeptr + 13 - A_IS_TOS = FALSE - fin + codeptr = codeptr + 4 + A_IS_TOS = TRUE // PHA break is $B8 // IDXLB i++ j = ^(bytecode+i) //puts("IDXLB "); puti(j) - if A_IS_TOS & TOS_DIRTY - ^codeptr = $48; codeptr++ // PHA + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - if VY <> j - *codeptr = $A0+(j<<8) // LDY #imm + if not X_IS_IFP + *codeptr = $E0A6 // LDX IFP codeptr = codeptr + 2 + X_IS_IFP = TRUE fin - *codeptr = $E0B1 // LDA (IFP),Y - codeptr = codeptr + 2 - if j <> 0 - *codeptr = $00A0 // LDY #$00 - codeptr = codeptr + 2 - fin - codeptr->0 = $0A // ASL - codeptr=>1 = $0290 // BCC +2 - codeptr=>3 = $18C8 // INY; CLC - codeptr=>5 = $D075+(VX<<8) // ADC ESTKL,X - codeptr=>7 = $D095+(VX<<8) // STA ESTKL,X - codeptr->9 = $98 // TYA - codeptr=>10 = $C075+(VX<<8) // ADC ESTKH,X - codeptr=>12 = $C095+(VX<<8) // STA ESTKH,X - codeptr = codeptr + 14 - VY = UNKNOWN - A_IS_TOS = FALSE + codeptr=>0 = $E685 // STA TMP + codeptr=>2 = $B5+(J<<8) // LDA dp,X + codeptr->4 = $29 // AND #$00FF + codeptr=>5 = $00FF + codeptr=>7 = $180A // ASL; CLC + codeptr=>9 = $E665 // ADC TMP + codeptr = codeptr + 11 + A_IS_TOS = TRUE // PHA break is $BA // IDXLW i++ j = ^(bytecode+i) //puts("IDXLW "); puti(j) - if A_IS_TOS & TOS_DIRTY - ^codeptr = $48; codeptr++ // PHA + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - if VY <> j - *codeptr = $A0+(j<<8) // LDY #imm + if not X_IS_IFP + *codeptr = $E0A6 // LDX IFP codeptr = codeptr + 2 + X_IS_IFP = TRUE fin - codeptr=>0 = $E0B1 // LDA (IFP),Y - codeptr->2 = $0A // ASL - codeptr=>3 = $E785 // STA $E7:TMPL - codeptr->5 = $C8 // INY - codeptr=>6 = $E0B1 // LDA (IFP),Y - codeptr=>8 = $A82A // ROL; TAY - codeptr=>10 = $E7A5 // LDA $E7:TMPL - codeptr->12 = $18 // CLC - codeptr=>13 = $D075+(VX<<8) // ADC ESTKL,X - codeptr=>15 = $D095+(VX<<8) // STA ESTKL,X - codeptr->17 = $98 // TYA - codeptr=>18 = $C075+(VX<<8) // ADC ESTKH,X - codeptr=>20 = $C095+(VX<<8) // STA ESTKH,X - codeptr = codeptr + 22 - VY = UNKNOWN - A_IS_TOS = FALSE + codeptr=>0 = $180A // ASL; CLC + codeptr=>2 = $75+(J<<8) // ADC dp,X + codeptr = codeptr + 4 + A_IS_TOS = TRUE // PHA break is $BC // IDXAB dest = *(bytecode+i+1) i = i + 2 //puts("IDXAB $"); puth(*(bytecode+i)) - if A_IS_TOS & TOS_DIRTY - ^codeptr = $48; codeptr++ // PHA + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - if VY <> 0 - *codeptr = $00A0 // LDY #$00 - codeptr = codeptr + 2 - fin - codeptr->0 = $AD // LDA abs - codeptr=>1 = dest - codeptr->3 = $0A // ASL - codeptr=>4 = $0290 // BCC +2 - codeptr=>6 = $18C8 // INY; CLC - codeptr=>8 = $D075+(VX<<8) // ADC ESTKL,X - codeptr=>10 = $D095+(VX<<8) // STA ESTKL,X - codeptr->12 = $98 // TYA - codeptr=>13 = $C075+(VX<<8) // ADC ESTKH,X - codeptr=>15 = $C095+(VX<<8) // STA ESTKH,X - codeptr = codeptr + 17 - VY = UNKNOWN - A_IS_TOS = FALSE + codeptr=>0 = $E685 // STA TMP + codeptr=>2 = $20E2 // SEP #$20 -> 8 BIT ACCUM/MEM + codeptr->4 = $AD // LDA abs + codeptr=>5 = dest + codeptr=>7 = $20C2 // REP #$20 -> 16 BIT ACCUM/MEM + codeptr->9 = $29 // AND #$00FF + codeptr=>10 = $00FF + codeptr=>12 = $180A // ASL; CLC + codeptr=>14 = $E665 // ADC TMP + codeptr = codeptr + 16 + A_IS_TOS = TRUE // PHA break is $BE // IDXAW dest = *(bytecode+i+1) i = i + 2 //puts("IDXAW $"); puth(dest) - if A_IS_TOS & TOS_DIRTY - ^codeptr = $48; codeptr++ // PHA + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA fin - codeptr->0 = $AD // LDA abs - codeptr=>1 = dest - codeptr->3 = $0A // ASL - codeptr=>4 = $E785 // STA $E7:TMPL - codeptr->6 = $AD // LDA abs+1 - codeptr=>7 = dest+1 - codeptr=>9 = $A82A // ROL; TAY - codeptr=>11 = $E7A5 // LDA $E7:TMPL - codeptr->13 = $18 // CLC - codeptr=>14 = $D075+(VX<<8) // ADC ESTKL,X - codeptr=>16 = $D095+(VX<<8) // STA ESTKL,X - codeptr->18 = $98 // TYA - codeptr=>19 = $C075+(VX<<8) // ADC ESTKH,X - codeptr=>21 = $C095+(VX<<8) // STA ESTKH,X - codeptr = codeptr + 23 - VY = UNKNOWN - A_IS_TOS = FALSE + codeptr=>0 = $180A // ASL; CLC + codeptr->2 = $6D // ADC abs + codeptr=>3 = dest + codeptr = codeptr + 5 + A_IS_TOS = TRUE // PHA break is $FE // NOPed out earlier by SELect break From 177c951a2d08b061e6f174a07102422a5c8101aa Mon Sep 17 00:00:00 2001 From: Dave Schmenk Date: Wed, 11 Apr 2018 07:49:19 -0700 Subject: [PATCH 10/74] Update images --- PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes src/mkrel | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PLASMA-SYS2.PO b/PLASMA-SYS2.PO index 584e5b3910dfd5e067129261afa50db52fa876d6..01043eb7355c44dd3468a7382477a0e2898c618d 100755 GIT binary patch delta 3207 zcmb7GeN=}>ojV$lsOvB7fHZ@S_8D!5L(5lH+yaZAwajYhI8J$ z_j!Ns?|t6i^LuWn?UB^>NKP#fnilEQ#d=L~p?;0tpwu7~mY^g=Ns%$TnCPHt> zW$6UUkHVHbg`%HuDw3cjQ(=`%AAykoa{$cH$vulwQ7;KF zlWf#uvUC}mryN&l#2Eos%Hzhto~SaEDJv_KhNaPixy>jMRVPn`MQ>LxMXVV)ho6upeN8xl9P=$#WqV##W-86R;#E1oKy` zA@UeAI>nw73yBL-tM0^UOiKxpm180M872sg77!d}gFu~+38Ai1Z;0$^#S3vbf!&OW z=~dtV!J4%{eD3*mKU)97i$8wJirYfC6~BhVbC?b}n?VqgU;gUVU%zIm-2yv@F`Gps zGw&0^-)y6P3xP+Nv58DF^f}5Y(N)E&z$?5Rx-OCLx^c=CDAh`hzHpUR5%s5tMkxr5 z2^{Gq8Oklu=?!t(ac_Z1&P*~%rdnH3T5i(Be8>F>yh%;+X8vfsMl$3qK$kO#E>Fpq zRW-)e1PyUTGVu<1dYwwAt&Ew|#94u^AYmddca^px&YFm8h4N1sUw-ghE_gHc?&Fnv zf7F}fl*{0cjHBcJ30KYMyL!BZ7nJCpdUEm7n8c!wfey`!B{!n5Tm|-xD;U=c{pFh6 zUmB%G6X#;?6DaGP@nr=Iw{p*e-xBNI_}%Y!?A-O{Zm`CE%)W@F;76fV7a1F=p3-buWWmrxJwV_@Cd727!Z3gVs3l z&dF2F5Q5f_L2C#BbNVkWQH+ETGN%dQyMI0N9t6Ob?}~VTr~K{jXV2NrU%2?erOO|- zeboMsE3GN7;=6O%>zLqkYZWfVk8nzd{pvM`)8+PbdVT(`?(6?*O)270HE^q*8$cL_ zrg#O1G20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96>vs%x^(zyhO{Z=HGDR z+Wqv#4r%mRtlUYRyU0@w*VjGmTiH z)O|=G)m>yE$*@M)IXDmHtS)~05z<=T#8F@5V%^;O&c37Sa)7vUdt_Tf~*L%dd96x z8JYkS2ZE0vnx{hs%}@BLVMnO3&bXgMo2ec*=uct1wVH$}>~Ns$|Gy7|N6 zeTE*IZFc1zfZVo^eDuJ_4&Hj($IG8M^vTMnKK+^754RnpPcN^esnqn@&wXC-RQhS8 z5~ot@7rywVnJ<6ktB1daWpu~I6rWbeeAo?~2xC2KVg;KMVh zgCnhtKCHA-X*m?(>I(?)nLNNwU2j-rX(>zD?7K>;|HX&AXBISyOIU`=?elTfCK@5< zG&jOl=XsIVwzfJCu=e^okm7~I)w`)ANnigal46z~ruWiWTE1Os`_|px`R@1bx%a;N zzyH7we)yvYfBeu)+Z|6Y=airP?B@^v;*m#x`Kw?5=C{9l?D5|};Zn|*%DqxWqf+Go z{C_|4?T>%{%U}QY_kaBJUv9oVNaK}Ts8rq{H6MNUxqm;8)t6~`W3+sWB>m?_yj5xW zpj3IBO3{~Ie&twomeBoJym{Vp^rgeIM<`uT8Ae)5k!CC(Yoe5sk5zUdyA7 Date: Wed, 11 Apr 2018 10:06:57 -0700 Subject: [PATCH 11/74] Build jit16 for real --- src/libsrc/apple/jit16.pla | 2 +- src/libsrc/jit16core.pla | 31 +++++++++++++++++-------------- src/makefile | 10 +++++----- src/samplesrc/rod.pla | 5 +++-- 4 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/libsrc/apple/jit16.pla b/src/libsrc/apple/jit16.pla index e22301b..d3839a0 100644 --- a/src/libsrc/apple/jit16.pla +++ b/src/libsrc/apple/jit16.pla @@ -37,7 +37,7 @@ def defcpy(dst, defptr)#0 *$0042 = dst call($C311, 0, 0, 0, $04) // CALL XMOVE with carry clear (AUX->MAIN) and ints disabled end -include "libsrc/jitcore.pla" +include "libsrc/jit16core.pla" // // Install JIT compiler // diff --git a/src/libsrc/jit16core.pla b/src/libsrc/jit16core.pla index d8bde74..0cbc01f 100644 --- a/src/libsrc/jit16core.pla +++ b/src/libsrc/jit16core.pla @@ -423,7 +423,7 @@ def compiler(defptr)#0 codeptr=>3 = $C3+(TOS<<8) // CMP TOS,S if opcode == $40 //puts("ISEQ") - codeptr=5 = $01D0 // BNE +1 + codeptr=>5 = $01D0 // BNE +1 else //puts("ISNE") codeptr=>5 = $01F0 // BEQ +1 @@ -1233,9 +1233,9 @@ def compiler(defptr)#0 codeptr=>2 = $B5+(J<<8) // LDA dp,X codeptr->4 = $29 // AND #$00FF codeptr=>5 = $00FF - codeptr=>7 = $180A // ASL; CLC - codeptr=>9 = $E665 // ADC TMP - codeptr = codeptr + 11 + codeptr->7 = $0A // ASL + codeptr=>8 = $E665 // ADC TMP + codeptr = codeptr + 10 A_IS_TOS = TRUE // PHA break is $BA // IDXLW @@ -1250,9 +1250,11 @@ def compiler(defptr)#0 codeptr = codeptr + 2 X_IS_IFP = TRUE fin - codeptr=>0 = $180A // ASL; CLC - codeptr=>2 = $75+(J<<8) // ADC dp,X - codeptr = codeptr + 4 + codeptr->0 = $18 // CLC + codeptr=>1 = $75+(J<<8) // ADC dp,X + codeptr->3 = $18 // CLC + codeptr=>4 = $75+(J<<8) // ADC dp,X + codeptr = codeptr + 6 A_IS_TOS = TRUE // PHA break is $BC // IDXAB @@ -1269,9 +1271,9 @@ def compiler(defptr)#0 codeptr=>7 = $20C2 // REP #$20 -> 16 BIT ACCUM/MEM codeptr->9 = $29 // AND #$00FF codeptr=>10 = $00FF - codeptr=>12 = $180A // ASL; CLC - codeptr=>14 = $E665 // ADC TMP - codeptr = codeptr + 16 + codeptr->12 = $0A // ASL + codeptr=>13 = $E665 // ADC TMP + codeptr = codeptr + 15 A_IS_TOS = TRUE // PHA break is $BE // IDXAW @@ -1281,10 +1283,11 @@ def compiler(defptr)#0 if not A_IS_TOS ^codeptr = $68; codeptr++ // PLA fin - codeptr=>0 = $180A // ASL; CLC - codeptr->2 = $6D // ADC abs - codeptr=>3 = dest - codeptr = codeptr + 5 + codeptr=>0 = $6D18 // CLC; ADC abs + codeptr=>2 = dest + codeptr=>4 = $6D18 // CLC; ADC abs + codeptr=>6 = dest + codeptr = codeptr + 8 A_IS_TOS = TRUE // PHA break is $FE // NOPed out earlier by SELect diff --git a/src/makefile b/src/makefile index e308491..692e4e3 100755 --- a/src/makefile +++ b/src/makefile @@ -232,7 +232,7 @@ hello: samplesrc/hello.pla $(PLVM) $(PLASM) acme --setpc 4094 -o $(HELLO) samplesrc/hello.a ./$(PLVM) HELLO $(ROD): samplesrc/rod.pla $(PLVM02) $(PLASM) - ./$(PLASM) -AMO < samplesrc/rod.pla > samplesrc/rod.a + ./$(PLASM) -AMOW < samplesrc/rod.pla > samplesrc/rod.a acme --setpc 4094 -o $(ROD) samplesrc/rod.a $(SIEVE): samplesrc/sieve.pla $(PLVM02) $(PLASM) @@ -364,19 +364,19 @@ $(MON): samplesrc/mon.pla $(PLVM02) $(PLASM) acme --setpc 4094 -o $(MON) samplesrc/mon.a $(SOS): libsrc/apple/sos.pla $(PLVM03) $(PLASM) - ./$(PLASM) -AMO < libsrc/apple/sos.pla > libsrc/apple/sos.a + ./$(PLASM) -AMOW < libsrc/apple/sos.pla > libsrc/apple/sos.a acme --setpc 4094 -o $(SOS) libsrc/apple/sos.a $(JIT): libsrc/apple/jit.pla libsrc/jitcore.pla $(PLVMJIT) $(PLASM) - ./$(PLASM) -AMO < libsrc/apple/jit.pla > libsrc/apple/jit.a + ./$(PLASM) -AMOW < libsrc/apple/jit.pla > libsrc/apple/jit.a acme --setpc 4094 -o $(JIT) libsrc/apple/jit.a $(JIT16): libsrc/apple/jit16.pla libsrc/jit16core.pla $(PLVMJIT) $(PLASM) - ./$(PLASM) -AMO < libsrc/apple/jit16.pla > libsrc/apple/jit16.a + ./$(PLASM) -AMOW < libsrc/apple/jit16.pla > libsrc/apple/jit16.a acme --setpc 4094 -o $(JIT16) libsrc/apple/jit16.a $(JITUNE): libsrc/apple/jitune.pla $(PLVMJIT) $(PLASM) - ./$(PLASM) -AMO < libsrc/apple/jitune.pla > libsrc/apple/jitune.a + ./$(PLASM) -AMOW < libsrc/apple/jitune.pla > libsrc/apple/jitune.a acme --setpc 4094 -o $(JITUNE) libsrc/apple/jitune.a diff --git a/src/samplesrc/rod.pla b/src/samplesrc/rod.pla index d754adb..e18d375 100644 --- a/src/samplesrc/rod.pla +++ b/src/samplesrc/rod.pla @@ -3,7 +3,7 @@ include "inc/conio.plh" // // Rod's Colors // -def rod +def rod#0 byte i, j, k, w, fmi, fmk, color while TRUE @@ -24,7 +24,8 @@ def rod conio:grplot(i, fmk) conio:grplot(fmk, i) if conio:keypressed() - return getc + getc + return fin next next From 7f46144911d2f96c6736a3c75943a5ab4dba49e1 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Wed, 11 Apr 2018 14:48:21 -0700 Subject: [PATCH 12/74] Working 65802 JIT compiler --- PLASMA-BLD2.PO | Bin 143360 -> 143360 bytes PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes src/libsrc/jit16core.pla | 215 +++++++++++++++++---------------------- 3 files changed, 92 insertions(+), 123 deletions(-) diff --git a/PLASMA-BLD2.PO b/PLASMA-BLD2.PO index 926a5646ebb1e31af24b9e96c66b86e1add9a472..0f5e15024faf14462f736205be23dd592922c461 100644 GIT binary patch delta 494 zcmX|-&nrYx6vxlK^O#Y*j+&XI3HfnJnuVp3g)9isXcn5J7YmD#o}I;v_mY$>UZZR* zB+bGCHCeDweoR@+g#0KAQMUdD&-YH6Tc3Nr-*fIg_jK34LhE0lvo1qK3d$G^2+A!4 zyE_x3Bgqk}uHQx>XjjnoPmdX*Z(=P9r@>W2_yr+9glle^B5%rY_KoBsQH%q0!MEkR z=l4Xl3xuhNk|`DAWS`%vwQ6J=SZ)8FR5ROszpZqTrc9J|Nk!Rm=f`JBi;AgrRT$T_ z4Wp)-*q&-8(ucD!mb;?&YE2uo9Gm>~(cO}+enVF)17L`wJztNMQth17Cv-ku*S2CW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W^7sm(Mnpj=;U7;8 k8^i0ggzn7Ik`ca2!xs>BZeD&tp+>7KO5fCJ1Ph`62XF7^AOHXW diff --git a/src/libsrc/jit16core.pla b/src/libsrc/jit16core.pla index 0cbc01f..a04dd93 100644 --- a/src/libsrc/jit16core.pla +++ b/src/libsrc/jit16core.pla @@ -280,10 +280,12 @@ def compiler(defptr)#0 codeptr = codeptr + 2 X_IS_IFP = TRUE fin - codeptr=>0 = $188A // TXA; CLC - codeptr->2 = $69 // ADC #imm - codeptr=>3 = j - codeptr = codeptr + 5 + ^codeptr = $8A; codeptr++ // TXA + if j <> 0 + codeptr=>0 = $6918 // CLC; ADC #imm + codeptr=>2 = j + codeptr = codeptr + 4 + fin A_IS_TOS = TRUE break is $2A // CB @@ -441,8 +443,8 @@ def compiler(defptr)#0 codeptr->0 = $A0 // LDY #$0000 codeptr=>1 = $0000 codeptr->3 = $38 // SEC - codeptr=>4 = $C3+(TOS<<8) // SBC TOS,S - codeptr=>6 = $0250 // BVC +3 + codeptr=>4 = $E3+(TOS<<8) // SBC TOS,S + codeptr=>6 = $0350 // BVC +3 codeptr->8 = $49 // EOR #$8000 codeptr=>9 = $8000 if opcode == $44 @@ -464,10 +466,10 @@ def compiler(defptr)#0 fin codeptr->0 = $A0 // LDY #$0000 codeptr=>1 = $0000 - codeptr=>3 = $E685 // STA TMP + codeptr=>3 = $E785 // STA TMP codeptr=>5 = $3868 // PLA; SEC - codeptr=>7 = $E6E5 // SBC TMP - codeptr=>9 = $0250 // BVC +3 + codeptr=>7 = $E7E5 // SBC TMP + codeptr=>9 = $0350 // BVC +3 codeptr->11 = $49 // EOR #$8000 codeptr=>12 = $8000 if opcode == $46 @@ -567,99 +569,67 @@ def compiler(defptr)#0 A_IS_TOS = FALSE break is $54 // CALL - //puts("CALL $"); puth(*(bytecode+i)) - // - // Call address - // - if A_IS_TOS - ^codeptr = $48; codeptr++ // PHA - fin - codeptr=>0 = $10E2 // SEP #$10 -> 8 BIT X/Y - codeptr->2 = $A9 // LDA #imm - codeptr=>3 = codeptr + 13 - codeptr=>5 = $F285 // STA IP - codeptr->7 = $A0 // LDY #$0000 - codeptr=>8 = $0000 - codeptr->10 = $4C // JMP FETCHOP - codeptr=>11 = $00F1 // FETCHOP - codeptr->13 = $54 // CALL ADDR - codeptr=>14 = *(bytecode+i+1) - codeptr->16 = $C0 // NATV - codeptr = codeptr + 17 - X_IS_IFP = FALSE - A_IS_TOS = FALSE - i = i + 2 - break is $56 // ICAL - //puts("ICAL") - // - // Pull address off stack - // - if A_IS_TOS - ^codeptr = $48; codeptr++ // PHA - fin - codeptr=>0 = $10E2 // SEP #$10 -> 8 BIT X/Y - codeptr->2 = $A9 // LDA #imm - codeptr=>3 = codeptr + 13 - codeptr=>5 = $F285 // STA IP - codeptr->7 = $A0 // LDY #$0000 - codeptr=>8 = $0000 - codeptr->10 = $4C // JMP FETCHOP - codeptr=>11 = $00F1 // FETCHOP - codeptr->13 = $56 // ICAL - codeptr->14 = $C0 // NATV - codeptr = codeptr + 15 - X_IS_IFP = FALSE - A_IS_TOS = FALSE - break is $5A // LEAVE - i++ - //puts("LEAVE "); puti(^(bytecode+i)) - // - // Call into VM - // + is $5C // RET if A_IS_TOS ^codeptr = $48; codeptr++ // PHA fin codeptr=>0 = $10E2 // SEP #$10 -> 8 BIT X/Y codeptr->2 = $A9 // LDA #imm - codeptr=>3 = codeptr + 13 + codeptr=>3 = codeptr + 12 codeptr=>5 = $F285 // STA IP - codeptr->7 = $A0 // LDY #$0000 - codeptr=>8 = $0000 - codeptr->10 = $4C // JMP FETCHOP - codeptr=>11 = $00F1 // FETCHOP - codeptr=>13 = $5A + (^(bytecode+i)<<8) // LEAVE CODE AND OPERAND - codeptr = codeptr + 15 + codeptr=>7 = $00A0 // LDY #$00 + codeptr->9 = $4C // JMP FETCHOP + codeptr=>10 = $00F1 // FETCHOP + codeptr->12 = opcode // OP + when opcode + is $54 // CALL + // + // Call address + // + //puts("CALL $"); puth(*(bytecode+i)) + codeptr=>13 = *(bytecode+i+1) // CALL ADDR + codeptr->15 = $C0 // NATV + codeptr = codeptr + 16 + i = i + 2 + break + is $56 // ICAL + // + // Call address off stack + // + //puts("ICAL") + codeptr->13 = $C0 // NATV + codeptr = codeptr + 14 + break + is $5A // LEAVE + // + // Leave routine + // + i++ + //puts("LEAVE "); puti(^(bytecode+i)) + codeptr->13 = ^(bytecode+i) // LEAVE CODE OPERAND + codeptr = codeptr + 14 + break + is $5C // RET + // + // Quick return from routine + // + //puts("RET") + codeptr = codeptr + 13 + break + wend X_IS_IFP = FALSE A_IS_TOS = FALSE break - is $5C // RET - //puts("RET") - if A_IS_TOS - ^codeptr = $48; codeptr++ // PHA - fin - codeptr=>0 = $10E2 // SEP #$10 -> 8 BIT X/Y - codeptr->2 = $A9 // LDA #imm - codeptr=>3 = codeptr + 13 - codeptr=>5 = $F285 // STA IP - codeptr->7 = $A0 // LDY #$0000 - codeptr=>8 = $0000 - codeptr->10 = $4C // JMP FETCHOP - codeptr=>11 = $00F1 // FETCHOP - codeptr->13 = $5C // RET - codeptr = codeptr + 14 - X_IS_IFP = FALSE - A_IS_TOS = FALSE - break is $60 // LB //puts("LB") if not A_IS_TOS ^codeptr = $68; codeptr++ // PLA fin - codeptr=>0 = $E685 // STA TMP + codeptr=>0 = $E785 // STA TMP codeptr=>2 = $20E2 // SEP #$20 -> 8 BIT ACCUM/MEM - codeptr=>4 = $E6B2 // LDA (TMP) + codeptr=>4 = $E7B2 // LDA (TMP) codeptr=>6 = $20C2 // REP #$20 -> 16 BIT ACCUM/MEM codeptr->8 = $29 // AND #$00FF codeptr=>9 = $00FF @@ -671,9 +641,9 @@ def compiler(defptr)#0 if not A_IS_TOS ^codeptr = $68; codeptr++ // PLA fin - codeptr=>0 = $E685 // STA TMP - codeptr=>4 = $E6B2 // LDA (TMP) - codeptr = codeptr + 6 + codeptr=>0 = $E785 // STA TMP + codeptr=>2 = $E7B2 // LDA (TMP) + codeptr = codeptr + 4 A_IS_TOS = TRUE // PHA break is $64 // LLB @@ -688,7 +658,7 @@ def compiler(defptr)#0 codeptr = codeptr + 2 X_IS_IFP = TRUE fin - codeptr=>0 = $B5+(J<<8) // LDA dp,X + codeptr=>0 = $B5+(j<<8) // LDA dp,X codeptr->2 = $29 // AND #$00FF codeptr=>3 = $00FF codeptr = codeptr + 5 @@ -706,7 +676,7 @@ def compiler(defptr)#0 codeptr = codeptr + 2 X_IS_IFP = TRUE fin - codeptr=>0 = $B5+(J<<8) // LDA dp,X + codeptr=>0 = $B5+(j<<8) // LDA dp,X codeptr = codeptr + 2 A_IS_TOS = TRUE // PHA break @@ -751,7 +721,7 @@ def compiler(defptr)#0 X_IS_IFP = TRUE fin codeptr=>0 = $20E2 // SEP #$20 -> 8 BIT ACCUM/MEM - codeptr=>2 = $55+(J<<8) // STA dp,X + codeptr=>2 = $95+(j<<8) // STA dp,X codeptr=>4 = $20C2 // REP #$20 -> 16 BIT ACCUM/MEM if opcode == $6C //puts("DLB "); puti(j) @@ -777,7 +747,7 @@ def compiler(defptr)#0 codeptr = codeptr + 2 X_IS_IFP = TRUE fin - codeptr=>0 = $55+(J<<8) // STA dp,X + codeptr=>0 = $95+(j<<8) // STA dp,X codeptr = codeptr + 2 if opcode == $6E //puts("DLW "); puti(j) @@ -792,10 +762,10 @@ def compiler(defptr)#0 if not A_IS_TOS ^codeptr = $68; codeptr++ // PLA fin - codeptr=>0 = $E685 // STA TMP + codeptr=>0 = $E785 // STA TMP codeptr->2 = $68 // PLA codeptr=>3 = $20E2 // SEP #$20 -> 8 BIT ACCUM/MEM - codeptr=>5 = $E692 // STA (TMP) + codeptr=>5 = $E792 // STA (TMP) codeptr=>7 = $20C2 // REP #$20 -> 16 BIT ACCUM/MEM codeptr = codeptr + 9 A_IS_TOS = FALSE @@ -805,9 +775,9 @@ def compiler(defptr)#0 if not A_IS_TOS ^codeptr = $68; codeptr++ // PLA fin - codeptr=>0 = $E685 // STA TMP + codeptr=>0 = $E785 // STA TMP codeptr->2 = $68 // PLA - codeptr=>3 = $E692 // STA (TMP) + codeptr=>3 = $E792 // STA (TMP) codeptr = codeptr + 5 A_IS_TOS = FALSE break @@ -883,9 +853,9 @@ def compiler(defptr)#0 if not A_IS_TOS ^codeptr = $68; codeptr++ // PLA fin - codeptr=>0 = $E685 // STA TMP + codeptr=>0 = $E785 // STA TMP codeptr=>2 = $3868 // PLA; SEC - codeptr=>4 = $E6E5 // SBC TMP + codeptr=>4 = $E7E5 // SBC TMP codeptr = codeptr + 6 A_IS_TOS = TRUE break @@ -915,14 +885,13 @@ def compiler(defptr)#0 fin codeptr=>0 = $10E2 // SEP #$10 -> 8 BIT X/Y codeptr->2 = $A9 // LDA #imm - codeptr=>3 = codeptr + 13 + codeptr=>3 = codeptr + 12 codeptr=>5 = $F285 // STA IP - codeptr->7 = $A0 // LDY #$0000 - codeptr=>8 = $0000 - codeptr->10 = $4C // JMP FETCHOP - codeptr=>11 = $00F1 // FETCHOP - codeptr=>13 = $C000+opcode // OPCODE; NATV CODE - codeptr = codeptr + 15 + codeptr=>7 = $00A0 // LDY #$00 + codeptr->9 = $4C // JMP FETCHOP + codeptr=>10 = $00F1 // FETCHOP + codeptr=>12 = $C000+opcode // OPCODE; NATV CODE + codeptr = codeptr + 14 X_IS_IFP = FALSE A_IS_TOS = FALSE break @@ -999,7 +968,7 @@ def compiler(defptr)#0 codeptr=>0 = $A3+(NOS<<8) // LDA S,NOS codeptr->2 = $38 // SEC codeptr=>3 = $E3+(TOS<<8) // SBC S,TOS - codeptr=>5 = $0250 // BVC +3 + codeptr=>5 = $0350 // BVC +3 codeptr->7 = $49 // EOR #$8000 codeptr=>8 = $8000 codeptr=>10 = $0510 // BPL +5 @@ -1022,7 +991,7 @@ def compiler(defptr)#0 fin codeptr->0 = $38 // SEC codeptr=>1 = $E3+(NOS<<8) // SBC S,NOS - codeptr=>3 = $0250 // BVC +3 + codeptr=>3 = $0350 // BVC +3 codeptr->5 = $49 // EOR #$8000 codeptr=>6 = $8000 codeptr=>8 = $0510 // BPL +5 @@ -1066,7 +1035,7 @@ def compiler(defptr)#0 codeptr=>0 = $A3+(NOS<<8) // LDA S,NOS codeptr->2 = $38 // SEC codeptr=>3 = $E3+(TOS<<8) // SBC S,TOS - codeptr=>5 = $0250 // BVC +3 + codeptr=>5 = $0350 // BVC +3 codeptr->7 = $49 // EOR #$8000 codeptr=>8 = $8000 codeptr=>10 = $0330 // BMI +3 @@ -1099,10 +1068,10 @@ def compiler(defptr)#0 // SUB // //puts("SUBBRGE "); puti(dest) - codeptr=>0 = $E685 // STA TMP + codeptr=>0 = $E785 // STA TMP codeptr=>2 = $A3+(TOS<<8) // LDA S,TOS codeptr->4 = $68 // SEC - codeptr=>5 = $E6E5 // SBC TMP + codeptr=>5 = $E7E5 // SBC TMP codeptr=>3 = $83+(TOS<<8) // STA S,TOS codeptr = codeptr + 6 fin @@ -1111,7 +1080,7 @@ def compiler(defptr)#0 // codeptr->0 = $38 // SEC codeptr=>1 = $E3+(NOS<<8) // SBC S,NOS - codeptr=>3 = $0250 // BVC +3 + codeptr=>3 = $0350 // BVC +3 codeptr->5 = $49 // EOR #$8000 codeptr=>6 = $8000 codeptr=>8 = $0330 // BMI +3 @@ -1136,10 +1105,10 @@ def compiler(defptr)#0 fin if opcode == $AC //puts("BRAND "); puti(dest) - codeptr=>1 = $03D0 // BNE +3 + codeptr=>1 = $04D0 // BNE +4 else //puts("BROR "); puti(dest) - codeptr=>1 = $03F0 // BEQ +3 + codeptr=>1 = $04F0 // BEQ +4 fin codeptr=>3 = $4C48 // PHA; JMP abs codeptr=>5 = addrxlate=>[dest] @@ -1161,12 +1130,12 @@ def compiler(defptr)#0 codeptr = codeptr + 2 X_IS_IFP = TRUE fin - codeptr=>0 = $E685 // STA TMP + codeptr=>0 = $E785 // STA TMP codeptr=>2 = $B5+(J<<8) // LDA dp,X codeptr->4 = $29 // AND #$00FF codeptr=>5 = $00FF codeptr->7 = $18 // CLC - codeptr=>8 = $E665 // ADC TMP + codeptr=>8 = $E765 // ADC TMP codeptr = codeptr + 10 A_IS_TOS = TRUE // PHA break @@ -1194,7 +1163,7 @@ def compiler(defptr)#0 if not A_IS_TOS ^codeptr = $68; codeptr++ // PLA fin - codeptr=>0 = $E685 // STA TMP + codeptr=>0 = $E785 // STA TMP codeptr=>2 = $20E2 // SEP #$20 -> 8 BIT ACCUM/MEM codeptr->4 = $AD // LDA abs codeptr=>5 = dest @@ -1202,7 +1171,7 @@ def compiler(defptr)#0 codeptr->9 = $29 // AND #$00FF codeptr=>10 = $00FF codeptr->12 = $18 // CLC - codeptr=>13 = $E665 // ADC TMP + codeptr=>13 = $E765 // ADC TMP codeptr = codeptr + 15 A_IS_TOS = TRUE // PHA break @@ -1229,12 +1198,12 @@ def compiler(defptr)#0 codeptr = codeptr + 2 X_IS_IFP = TRUE fin - codeptr=>0 = $E685 // STA TMP + codeptr=>0 = $E785 // STA TMP codeptr=>2 = $B5+(J<<8) // LDA dp,X codeptr->4 = $29 // AND #$00FF codeptr=>5 = $00FF codeptr->7 = $0A // ASL - codeptr=>8 = $E665 // ADC TMP + codeptr=>8 = $E765 // ADC TMP codeptr = codeptr + 10 A_IS_TOS = TRUE // PHA break @@ -1264,7 +1233,7 @@ def compiler(defptr)#0 if not A_IS_TOS ^codeptr = $68; codeptr++ // PLA fin - codeptr=>0 = $E685 // STA TMP + codeptr=>0 = $E785 // STA TMP codeptr=>2 = $20E2 // SEP #$20 -> 8 BIT ACCUM/MEM codeptr->4 = $AD // LDA abs codeptr=>5 = dest @@ -1272,7 +1241,7 @@ def compiler(defptr)#0 codeptr->9 = $29 // AND #$00FF codeptr=>10 = $00FF codeptr->12 = $0A // ASL - codeptr=>13 = $E665 // ADC TMP + codeptr=>13 = $E765 // ADC TMP codeptr = codeptr + 15 A_IS_TOS = TRUE // PHA break @@ -1287,8 +1256,8 @@ def compiler(defptr)#0 codeptr=>2 = dest codeptr=>4 = $6D18 // CLC; ADC abs codeptr=>6 = dest - codeptr = codeptr + 8 - A_IS_TOS = TRUE // PHA + codeptr = codeptr + 8 + A_IS_TOS = TRUE // PHA break is $FE // NOPed out earlier by SELect break From 23aaef442d4e027fb3b50326b2e70b86313562a8 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Wed, 11 Apr 2018 22:16:30 -0700 Subject: [PATCH 13/74] Cleanup --- PLASMA-BLD2.PO | Bin 143360 -> 143360 bytes PLASMA-DEM2.PO | Bin 143360 -> 143360 bytes PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes src/libsrc/jit16core.pla | 44 +++++++++++++++++++-------------------- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/PLASMA-BLD2.PO b/PLASMA-BLD2.PO index 0f5e15024faf14462f736205be23dd592922c461..0d1691e5de3186c815fcb32f409313538e53ef6f 100644 GIT binary patch delta 555 zcmX|-Jxjw-6o$`DBW+C^YqUXdlWM`C;?PMP@^SM4Np8%C=62Wk*D4vSl2%A?31{#OuSoFI z0U2IElYT|TKW%uxt6f+F^3w*LEIUSK8Cfq53}^|>gsR1C%Hj;xh42W9?Isybg^TGZ z_Q8avb!tykwN9CF$P9<#7Xak`U zHd;xTo70}fLQ}j5@KvXL)x||<#3F#tI_0x2WXu+grr_yBN#e*d0;@F6kgumcJ*Glh cMRta4tz3dX@(jBxTnT)W+wO>TFy4~XKkk2jJ^%m! delta 98 zcmZp8z|ru4V}lrrfWC@49|Hq~e5}qZx>=3ImRXe{$lrwl3H%daWCU?L-tY=?Fg#`u k05LXqu+L&){J)uz=`LdvUmG9eGCn4u#R6PR%aoY-0Q$fcH2?qr diff --git a/PLASMA-DEM2.PO b/PLASMA-DEM2.PO index 1ee53641774ad13371ef918424a449a376ea176b..1bca81b9440f553e06fc8b1e7bd1441ef0b6284e 100644 GIT binary patch delta 263 zcmZp8z|ru4V}lrrK(~qjKLdlliZUMq!((+`&dq8pwv4LMZk~QFu0eV(jvXH$ delta 322 zcmXAhO(;ZB7(nlRJu~m#9y4JmO~~`NB1?&-B4tWSG|J9G*(e(|^Np>A+bmudvm{aS zSF=*eMk%F~jhGUf*(e*OR*;-gG6##0hZR_bHCTrYqui$P-Ihs8fiA%g>_VB{o@sU!la+n^ zkax!>loNJm^rh*MDt-mm^o{9~Tl^00;lUJ?JR(mlpG_pM_&Z+b!%zGR|2Cfd;J@Ho z<&rk#LOUpFtE2_mp@aKwo0UF%2p_SXZj_#&C+R8c%M5eYHpo14fnH)RYa1Ws^-CP* KbaXJSKmGs@Nmz6M diff --git a/PLASMA-SYS2.PO b/PLASMA-SYS2.PO index bf5330d61b4e584ad767c7c0ee965ad93c15c833..ab8573b63e9da049ebc9d2563077e5bb62a3d1a3 100755 GIT binary patch delta 943 zcmZWmOHUJF6usZf^nsO5DKI9M1%_Gzm?|V?;f72*U&}O|2lEJl!~{i#V3damlDH|l z!r;QjG?=*X8CE138f-$8MB~OEz>=g17`JXnTv_ios2iH;%$$4Ax%ZrJRvY2fM)4Z#2{AIjsvIQps;*Egt;miH`1=+k1YQBGC!^xx-VgTDC)Tb9 zJ_pH2jc^BKJ9_agNz_u?^4D1L9JW(p4;(UHO02KkBaa3m&n0dKARgnPT#vjad4cQd zsN0+5d;3TR`b!=x-a6tvczoC6?jP~#Hf3Rcrh9tf&f?tdx%t_v-AM-k+c)rm*JRw| zE;aV>O+VNe-zDRTYm!j8DYaB)CBCvGB_6CvPix{n^7)a=3pAu;0-iLlAQ=7L4aL|bH9DWZXsB~dq127(r_UQ zyggwz5&Z0AAg3u!(Fa=)L{L;6X!o&1&X^_H*5ov+Nm$FEp!IJJhd5M&3rw2<)S8x| z7&f%|SR&yQ-rz7=og!$n7oso=9$E5@owj)%o)Km7|TBETWe(5<4w2UZDUY%eck?9}G2 z7Gp|fU=R{uW{BU;y@=6`h3Sv*_TXiVPlczSoX;r2EtJNj^I%^H1B2h+>E*i^!}$Wm rq#HBD7$z0~ajDq$sS6lg7`N?V)DGCp#B`N$86T6-A}Nk#8cZAjW=As3 diff --git a/src/libsrc/jit16core.pla b/src/libsrc/jit16core.pla index a04dd93..e86c8e9 100644 --- a/src/libsrc/jit16core.pla +++ b/src/libsrc/jit16core.pla @@ -366,14 +366,6 @@ def compiler(defptr)#0 codeptr = codeptr + 4 A_IS_TOS = TRUE // PHA break - is $8C // INCR - //puts("INCR") - if not A_IS_TOS - ^codeptr = $68; codeptr++ // PLA - fin - ^codeptr = $1A; codeptr++ // INC A - A_IS_TOS = TRUE // PHA - break is $3A // SUBI i++ //puts("SUBI $"); putb(^(bytecode+i)) @@ -385,14 +377,6 @@ def compiler(defptr)#0 codeptr = codeptr + 4 A_IS_TOS = TRUE // PHA break - is $8E // DECR - //puts("DECR") - if not A_IS_TOS - ^codeptr = $68; codeptr++ // PLA - fin - ^codeptr = $3A; codeptr++ // DEC A - A_IS_TOS = TRUE // PHA - break is $3C // ANDI i++ //puts("ANDI $"); putb(^(bytecode+i)) @@ -441,12 +425,12 @@ def compiler(defptr)#0 ^codeptr = $68; codeptr++ // PLA fin codeptr->0 = $A0 // LDY #$0000 - codeptr=>1 = $0000 - codeptr->3 = $38 // SEC - codeptr=>4 = $E3+(TOS<<8) // SBC TOS,S - codeptr=>6 = $0350 // BVC +3 - codeptr->8 = $49 // EOR #$8000 - codeptr=>9 = $8000 + codeptr=>1 = $0000 + codeptr->3 = $38 // SEC + codeptr=>4 = $E3+(TOS<<8) // SBC TOS,S + codeptr=>6 = $0350 // BVC +3 + codeptr->8 = $49 // EOR #$8000 + codeptr=>9 = $8000 if opcode == $44 //puts("ISGT") codeptr=>11 = $0110 // BPL +1 @@ -895,6 +879,22 @@ def compiler(defptr)#0 X_IS_IFP = FALSE A_IS_TOS = FALSE break + is $8C // INCR + //puts("INCR") + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA + fin + ^codeptr = $1A; codeptr++ // INC A + A_IS_TOS = TRUE // PHA + break + is $8E // DECR + //puts("DECR") + if not A_IS_TOS + ^codeptr = $68; codeptr++ // PLA + fin + ^codeptr = $3A; codeptr++ // DEC A + A_IS_TOS = TRUE // PHA + break is $90 // NEG //puts("NEG") if not A_IS_TOS From 2bb9f73448af3e695d797d731ffb87bd448feab2 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Thu, 12 Apr 2018 14:20:02 -0700 Subject: [PATCH 14/74] Fix INCBRLE and JIT cleanup --- PLASMA-BLD2.PO | Bin 143360 -> 143360 bytes PLASMA-DEM2.PO | Bin 143360 -> 143360 bytes PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes src/libsrc/jit16core.pla | 14 +++++++------- src/toolsrc/codegen.pla | 15 ++++----------- src/vmsrc/apple/plvm802.s | 6 +++--- 6 files changed, 14 insertions(+), 21 deletions(-) diff --git a/PLASMA-BLD2.PO b/PLASMA-BLD2.PO index 0d1691e5de3186c815fcb32f409313538e53ef6f..4992cd2fb7a8bf8833f5316041d987137a20f043 100644 GIT binary patch delta 485 zcmX|+Jxjw-6o&7KDQTNF)!GI(qgKa?Ll?Jv+@^)3iTMznt%@KBLR?!M#GzX$1!r+` zP(u9??j41Kf1rOr^qyPlcJFiF=brcUXW9NN`?f1WHQf_Gp*X0?$`1J^1P|#?<^q5W zyOJgjY9%Fol%7QRO+omAd*wla4@JnA;dv};!e*~bU_K=V$%SotOzXa*&sQ0$G9;Ov zMLj>7S2%bjvSkMm4I`df=TL=wQ;$rYGomuqU}mw|Ht2t}i++PJ-)^2*)b-HUaBze4 zRLHfc<8XFfWh`cXp=AdL%So4*jG3NmMUiizd{rPYi-`&=?T(q?_X)FPm%2;o43|il zB)MJ(l{*M5-Ok#K{$Nb7L-4U Cn|uub delta 451 zcmX|-y-LGi6o$`cN7ZVfHxrceW%zhJbBN1p6^VS<;k-AdL*M>9LpbAzwa3JL-+;|AH{F!261nC zrL^UzPGhrpRGwuV7btzzk`_l9Tw72Z zxbf+KD~M#q$18(0jU3Xc0WLGHxG@ZDsvq&Ks?YrOkPsg6A;k{^8qo;oSmMhQA9BNx znkV$GnTW;Vs(F{kX1sYb4&97(?a;UA1dv}Ek{*!ELddNCi`$4(Ecl2TM}cj6HmwuV dpIoYv4B0s&v`uIZ<+Wt~#wDgGoxL1L+8@tRYU}_2 diff --git a/PLASMA-DEM2.PO b/PLASMA-DEM2.PO index 1bca81b9440f553e06fc8b1e7bd1441ef0b6284e..eb2bcfdeaf18b7bfaea48fcd83252fbdda415009 100644 GIT binary patch delta 38 ucmZp8z|ru4V}mLSBgbYn7F$L}hRrFg8`v26n?-rrMR^#vi}EnNRt5mp3JK-_ delta 38 ucmZp8z|ru4V}mLSBj;u{7F$L}>CGvu8`v1xn?-rrMR^#vi}EnNRt5mq?Fsq- diff --git a/PLASMA-SYS2.PO b/PLASMA-SYS2.PO index ab8573b63e9da049ebc9d2563077e5bb62a3d1a3..b76cb662d6a20ead9e09f82efc039bf02d81e921 100755 GIT binary patch delta 1503 zcmc(de@s(X6vxlGE&U-C9tef$a8IZribEH-F%&nTATTIJK!O$o0pVhGdwBP<~A+gtAJO8T_k@iCN;RjgU|w8INCW8BX?I{gLedC42YXd%xe$ zJ?Gw>210CMF1ABzCFXyheIoQm0XvLjyE&@sI$RlLJ_3on}c; z&pQFvWcYIr5+`;CnJ=QTr@?abI-`hyI!%Zw21dXytkp;GoArT5)nq?FC?kQr*1%@W zkdg<>tOYGNN+@#)!)ZB(&yeekXu@b8hmqv$V>8BK1Xj>R4vSDNZp-PxRxBpX!Hung z9&N?lBtDpSUBOs-;4*F}13{t*qrY6nEm+>zhLd=d@@+VPgS5RJGq76RB50rmLx@gA z4_WXPy32x*xIn8cs3pCD)OZP_=uHc5Chz&pN*ddNVI(1tx~!N$D>^Wp^eqw1Mmo}g zEFPfJPJETbE}`k2_&o6{X^ItBQgbI}kW+pWMSYzZje5GG3%8LFC4I9Cr8>Z3+T^K=jDd@`_Mm?LTFfck5tSc=cRVAeE2w9i(M6p(;8()yfYzf$AOX1<{`;a?V0iVxR!sJ{P zBzq3Sr=E}CgSjJcckUBt@_Yu1o@1$S+H)Md9wTh_ehCM?U%^>#E&S^J8iu?lVbEI# z;l6s<=rh6VzVF~eUjsDw8sVz%4E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2 = $A3+(TOS<<8) // LDA S,TOS codeptr->4 = $68 // SEC codeptr=>5 = $E7E5 // SBC TMP - codeptr=>3 = $83+(TOS<<8) // STA S,TOS - codeptr = codeptr + 6 + codeptr=>7 = $83+(TOS<<8) // STA S,TOS + codeptr = codeptr + 9 fin // // BRGE @@ -1131,7 +1131,7 @@ def compiler(defptr)#0 X_IS_IFP = TRUE fin codeptr=>0 = $E785 // STA TMP - codeptr=>2 = $B5+(J<<8) // LDA dp,X + codeptr=>2 = $B5+(j<<8) // LDA dp,X codeptr->4 = $29 // AND #$00FF codeptr=>5 = $00FF codeptr->7 = $18 // CLC @@ -1152,7 +1152,7 @@ def compiler(defptr)#0 X_IS_IFP = TRUE fin codeptr->0 = $18 // CLC - codeptr=>1 = $75+(J<<8) // ADC dp,X + codeptr=>1 = $75+(j<<8) // ADC dp,X codeptr = codeptr + 3 A_IS_TOS = TRUE // PHA break @@ -1199,7 +1199,7 @@ def compiler(defptr)#0 X_IS_IFP = TRUE fin codeptr=>0 = $E785 // STA TMP - codeptr=>2 = $B5+(J<<8) // LDA dp,X + codeptr=>2 = $B5+(j<<8) // LDA dp,X codeptr->4 = $29 // AND #$00FF codeptr=>5 = $00FF codeptr->7 = $0A // ASL @@ -1220,9 +1220,9 @@ def compiler(defptr)#0 X_IS_IFP = TRUE fin codeptr->0 = $18 // CLC - codeptr=>1 = $75+(J<<8) // ADC dp,X + codeptr=>1 = $75+(j<<8) // ADC dp,X codeptr->3 = $18 // CLC - codeptr=>4 = $75+(J<<8) // ADC dp,X + codeptr=>4 = $75+(j<<8) // ADC dp,X codeptr = codeptr + 6 A_IS_TOS = TRUE // PHA break diff --git a/src/toolsrc/codegen.pla b/src/toolsrc/codegen.pla index 6f4cd5f..24498fa 100644 --- a/src/toolsrc/codegen.pla +++ b/src/toolsrc/codegen.pla @@ -888,17 +888,10 @@ def writeDFD(refnum, modfix)#0 dfd = @defdir for cnt = 0 to dfd_cnt-1 - //dfd, idptr, cnt = @defdir, idglobal_tbl, globals - //while cnt - //if idptr=>idtype & (FUNC_TYPE|EXTERN_TYPE) == FUNC_TYPE - dfd->0 = $02 - dfd=>1 = tag_addr=>[dfd_tag=>[cnt]] + modfix - dfd->3 = 0 - dfd = dfd + 4 - //fin - //idptr = idptr + idptr->idname + t_id - //cnt-- - //loop + dfd->0 = $02 + dfd=>1 = tag_addr=>[dfd_tag=>[cnt]] + modfix + dfd->3 = 0 + dfd = dfd + 4 next fileio:write(refnum, @defdir, dfd - @defdir) end diff --git a/src/vmsrc/apple/plvm802.s b/src/vmsrc/apple/plvm802.s index 706d8cc..ed319bb 100644 --- a/src/vmsrc/apple/plvm802.s +++ b/src/vmsrc/apple/plvm802.s @@ -545,7 +545,7 @@ JITINTRPX PHP STX ALTRDON LDX #>OPXTBL !IF DEBUG { -SETDBG LDY LCRWEN+LCBNK2 + LDY LCRWEN+LCBNK2 LDY LCRWEN+LCBNK2 STX DBG_OP+2 LDY LCRDEN+LCBNK2 @@ -579,7 +579,7 @@ RUNJIT DEX ; ADD PARAMETER TO DEF ENTRY STX ALTRDON LDX #>OPXTBL !IF DEBUG { -SETDBG LDY LCRWEN+LCBNK2 + LDY LCRWEN+LCBNK2 LDY LCRWEN+LCBNK2 STX DBG_OP+2 LDY LCRDEN+LCBNK2 @@ -1589,7 +1589,7 @@ _BRLE LDA NOS,S BPL BRNCH PLA ; DROP FOR VALUES PLA - BNE NOBRNCH ; BMI NOBRNCH + BRA NOBRNCH ; BMI NOBRNCH + BMI BRNCH PLA ; DROP FOR VALUES PLA From 795d56c2a7719465a1245067c8b2aff30609b561 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Thu, 12 Apr 2018 17:15:16 -0700 Subject: [PATCH 15/74] Fix SEL JIT16 compiler --- PLASMA-BLD2.PO | Bin 143360 -> 143360 bytes PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes src/libsrc/jit16core.pla | 2 +- src/toolsrc/parse.pla | 2 -- 4 files changed, 1 insertion(+), 3 deletions(-) diff --git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vfT+_T-5nQ{ae)jW(NeA%Bvs>UVMCHK8K(R7MN>9*5wMCn z_?4n()U9V!%DuC6Z_j9nzj(01$`@y;RB{AZ^m>3b>%z=&LzEj!_~L6S<9}X}nLA@N zN+}+R(J>aW^7H~V^7R-UVzpKtNopxaoQ}{Mm*aGqCizO7YDng5ajIqw5*K4yVqb#x zvftt^^cCRK4wUj+394X^|3e}{*=DR~TOg{fXjR(~P}?!1c4As};fvah{#*~-xn6u$`=I1J zNabW4+#JM}%`-TcABHbKilO{joX(%elgt#kAXdeWj zkYV(vTOqfpS!uY^5!Fr9RaX&2AXZ4B+dC(8)7Lxg;^FW+&pD@mUfVyfeVn6adBSwA zdMgwiuF&M_2W*Coz88x`gEpPvdb=jlu0fh#)MhJ&Q7E77(tDi{W9~GQQSy(n>!3Hvxz?$MW)f}WrN*bR;~&#>m^YtHuL4D*v@T1v|^I? z1+kA^G4b+Al=81Z>|g~-ZyH(L8p0lY=28gf(aq;VD8x~|5JCalY2;#1No)yY6ZakkG|nkE0}K zj*9+x)24JjuWm4)>kyskRMhEZzDULdmV~~g<$Th|Y_uU(NY`S!Xew4jns^BXV!O#6 zFQsUFFOA0c)7yACeUDdAmVAh+mU2+Ui-VTkYV1=lF)-yloaI^v#ydS350q$ERFR z0 = $68 // PLA + codeptr->0 = $68; codeptr++ // PLA fin repeat dest = *(bytecode+case) diff --git a/src/toolsrc/parse.pla b/src/toolsrc/parse.pla index 79d0cee..c846fcc 100644 --- a/src/toolsrc/parse.pla +++ b/src/toolsrc/parse.pla @@ -80,8 +80,6 @@ def calc_binaryop(op)#0 push_val(val1, size1, type1) end def parse_constterm - word val - byte size, type when scan is OPEN_PAREN_TKN From 3a6c77a4eb8b230b47fb90a5472683fd06d40131 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Fri, 13 Apr 2018 12:09:14 -0700 Subject: [PATCH 16/74] Simplify VM configurations and auto-load alternative VMs --- src/libsrc/apple/jit16.pla | 1 + src/makefile | 6 +- src/vmsrc/apple/cmd.pla | 106 +--- src/vmsrc/apple/cmdjit.pla | 8 +- src/vmsrc/apple/cmdjitstub.s | 27 +- src/vmsrc/apple/cmdstub.s | 76 +-- src/vmsrc/apple/plvm02.s | 1012 +++------------------------------- src/vmsrc/apple/plvm802.s | 22 +- src/vmsrc/apple/plvmjit02.s | 25 +- 9 files changed, 178 insertions(+), 1105 deletions(-) diff --git a/src/libsrc/apple/jit16.pla b/src/libsrc/apple/jit16.pla index d3839a0..37e7ce1 100644 --- a/src/libsrc/apple/jit16.pla +++ b/src/libsrc/apple/jit16.pla @@ -47,5 +47,6 @@ fin *jitcomp = @compiler cmdsys.jitcount = 44 cmdsys.jitsize = 96 +puts("16 BIT VM/JITC enabled.\n") return modkeep done diff --git a/src/makefile b/src/makefile index 692e4e3..8a76ceb 100755 --- a/src/makefile +++ b/src/makefile @@ -4,12 +4,12 @@ PLVM = plvm PLVMZP_APL = vmsrc/apple/plvmzp.inc PLVM01 = rel/apple/A1PLASMA\#060280 PLVM02 = rel/apple/PLASMA.SYSTEM\#FF2000 -PLVMJIT = rel/apple/PLASMAJIT.SYSTEM\#FF2000 -PLVM802 = rel/apple/PLASMA16.SYSTEM\#FF2000 +PLVMJIT = rel/apple/PLVM-128\#FF2000 +PLVM802 = rel/apple/PLVM16\#FF2000 PLVM03 = rel/apple/SOS.INTERP\#050000 SOSCMD = rel/apple/SOS.CMD\#FE1000 CMD = rel/apple/CMD\#061000 -CMDJIT = rel/apple/CMDJIT\#061000 +CMDJIT = rel/apple/CMD128\#061000 PLVMZP_C64 = vmsrc/c64/plvmzp.inc PLVMC64 = rel/c64/PLASMA ED = rel/ED\#FE1000 diff --git a/src/vmsrc/apple/cmd.pla b/src/vmsrc/apple/cmd.pla index 300a185..78fb73b 100755 --- a/src/vmsrc/apple/cmd.pla +++ b/src/vmsrc/apple/cmd.pla @@ -931,39 +931,6 @@ def releaseheap(newheap)#1 heap = newheap return @newheap - heap end -def allocxheap(size)#1 - word xaddr - xaddr = xheap - xheap = xheap + size - if systemflags & restxt1 - if uword_isle(xaddr, $0800) and uword_isgt(xheap, $0400) - xaddr = $0800 - xheap = xaddr + size - fin - fin - if systemflags & restxt2 - if uword_isle(xaddr, $0C00) and uword_isgt(xheap, $0800) - xaddr = $0C00 - xheap = xaddr + size - fin - fin - if systemflags & resxhgr1 - if uword_isle(xaddr, $4000) and uword_isgt(xheap, $2000) - xaddr = $4000 - xheap = xaddr + size - fin - fin - if systemflags & resxhgr2 - if uword_isle(xaddr, $6000) and uword_isgt(xheap, $4000) - xaddr = $6000 - xheap = xaddr + size - fin - fin - if uword_isge(xheap, $BF00) - return 0 - fin - return xaddr -end // // Symbol table routines. // @@ -1009,12 +976,12 @@ def lookupextern(esd, index)#1 fin return 0 end -def adddef(bank, addr, deflast)#1 +def adddef(addr, deflast)#1 word defentry defentry = *deflast *deflast = defentry + 5 defentry->0 = $20 - defentry=>1 = bank ?? $03DC :: $03D6 // JSR $03DC (AUX MEM INTERP) or $03D6 (MAIN MEM INTERP) + defentry=>1 = $03D6 defentry=>3 = addr defentry->5 = 0 // NULL out next entry return defentry @@ -1024,7 +991,7 @@ def loadmod(mod)#1 word addr, defaddr, modaddr, modfix, modofst, modend word deftbl, deflast word moddep, rld, esd, sym - byte refnum, defbank, filename[64], str[] + byte refnum, filename[64], str[] byte header[128] // // Read the RELocatable module header (first 128 bytes) @@ -1121,17 +1088,7 @@ def loadmod(mod)#1 esd = esd + 4 loop esd = esd + 1 - // - // Locate bytecode defs in appropriate bank. - // - if ^MACHID & $30 == $30 - defbank = 1 - defaddr = allocxheap(rld - bytecode) - modend = bytecode - else - defbank = 0 - defaddr = bytecode - fin + defaddr = bytecode codefix = defaddr - bytecode defofst = defaddr - defofst // @@ -1141,7 +1098,7 @@ def loadmod(mod)#1 // // This is a bytcode def entry - add it to the def directory. // - adddef(defbank, rld=>1 + defofst, @deflast) + adddef(rld=>1 + defofst, @deflast) rld = rld + 4 loop // @@ -1153,31 +1110,6 @@ def loadmod(mod)#1 *addr = ^rld & $10 ?? *addr + lookupextern(esd, rld->3) :: lookupdef(fixup + codefix, deftbl) rld = rld + 4 fin - //addr = rld=>1 + modfix - //if uword_isge(addr, modaddr) // Skip fixups to header - // if type & $80 // WORD sized fixup. - // fixup = *addr - // else // BYTE sized fixup. - // fixup = ^addr - // fin - // if ^rld & $10 // EXTERN reference. - // fixup = fixup + lookupextern(esd, rld->3) - // else // INTERN fixup. - // fixup = fixup + modofst - // if uword_isge(fixup, bytecode) - // // - // // Bytecode address - replace with call def directory. - // // - // fixup = lookupdef(fixup + codefix, deftbl) - // fin - // fin - // if type & $80 // WORD sized fixup. - // *addr = fixup - // else // BYTE sized fixup. - // ^addr = fixup - // fin - //fin - //rld = rld + 4 loop // // Run through the External/Entry Symbol Directory. @@ -1200,15 +1132,6 @@ def loadmod(mod)#1 fin esd = esd + 3 loop - if defbank - // - // Move bytecode to AUX bank. - // - *$003C = bytecode - *$003E = modaddr + modsize - *$0042 = defaddr - call($C311, 0, 0, 0, $05) // CALL XMOVE with carry set (MAIN->AUX) and ints disabled - fin else perr = $46 fin @@ -1216,7 +1139,7 @@ def loadmod(mod)#1 return -perr fin // - // Free up rld+esd (and bytecode on 128K) in main memory. + // Free up rld+esd in main memory. // releaseheap(modend) // @@ -1225,19 +1148,12 @@ def loadmod(mod)#1 fixup = 0 // This is repurposed for the return code if init init = init + defofst - fixup = adddef(defbank, init, @deflast)() + fixup = adddef(init, @deflast)() if fixup < modinitkeep // // Free init routine unless initkeep // - if defbank - xheap = init - else - // - // Free up init code in main memory. - // - releaseheap(init) - fin + releaseheap(init) if fixup < 0 perr = -fixup fin @@ -1366,6 +1282,9 @@ def parsecmd(strptr)#1 return cmd end def resetmemfiles()#0 + byte terr + + terr = perr // Save perr // // Close all files // @@ -1377,6 +1296,7 @@ def resetmemfiles()#0 memset($BF58, 0, 24) ^$BF58 = $CF ^$BF6F = $01 + perr = terr // Restore perr end def execsys(sysfile)#0 byte refnum @@ -1430,7 +1350,7 @@ heap = *freemem // // Print PLASMA version // -prstr("PLASMA 2.0 Dev\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout +prstr("PLASMA 64K 2.0 Dev\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout // // Init symbol table. // diff --git a/src/vmsrc/apple/cmdjit.pla b/src/vmsrc/apple/cmdjit.pla index 442bf2d..ee5f38b 100755 --- a/src/vmsrc/apple/cmdjit.pla +++ b/src/vmsrc/apple/cmdjit.pla @@ -1346,6 +1346,9 @@ def parsecmd(strptr)#1 return cmd end def resetmemfiles()#0 + byte terr + + terr = perr // Save perr // // Close all files // @@ -1357,6 +1360,7 @@ def resetmemfiles()#0 memset($BF58, 0, 24) ^$BF58 = $CF ^$BF6F = $01 + perr = terr // Restore perr end def execsys(sysfile)#0 byte refnum @@ -1412,7 +1416,7 @@ heap = *freemem // // Print PLASMA version // -prstr("PLASMA JITC 2.0 Dev\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout +prstr("PLASMA 128K 2.0 Dev\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout // // Init symbol table. // @@ -1428,7 +1432,7 @@ strcat(strcpy(@sysmods, $280), "SYS/")) // This is the path to CMD syspath = @sysmods // Update external interface table syscmdln = @cmdln loadmod(jitmod) -xheap = $0800 // Reset heap to point at low memory +xheap = $0400 // Reset heap to point at low memory xheaptop = $A000 // Top where JIT loaded // // Try to load autorun. diff --git a/src/vmsrc/apple/cmdjitstub.s b/src/vmsrc/apple/cmdjitstub.s index 8e926dd..483d4bb 100644 --- a/src/vmsrc/apple/cmdjitstub.s +++ b/src/vmsrc/apple/cmdjitstub.s @@ -1,12 +1,12 @@ -INTERP = $03D0 -LCRDEN = $C080 -LCWTEN = $C081 -ROMEN = $C082 -LCRWEN = $C083 -LCBNK2 = $00 -LCBNK1 = $08 -JITCOMP = $03E2 -JITCODE = $03E4 +INTERP = $03D0 +LCRDEN = $C080 +LCWTEN = $C081 +ROMEN = $C082 +LCRWEN = $C083 +LCBNK2 = $00 +LCBNK1 = $08 +JITCOMP = $03E2 +JITCODE = $03E4 !SOURCE "vmsrc/plvmzp.inc" ;* ;* MOVE CMD DOWN TO $1000-$2000 @@ -25,7 +25,7 @@ JITCODE = $03E4 BNE - INC SRCH INC DSTH - DEX ; STOP WHEN DST=$2000 REACHED + DEX ; STOP WHEN DST=$2000 REACHED BNE - LDA #<_CMDEND STA SRCL @@ -34,11 +34,11 @@ JITCODE = $03E4 ; ; INIT VM ENVIRONMENT STACK POINTERS ; + STY PPL + STY IFPL ; INIT FRAME POINTER = $AF00 (4K FOR JIT CODE) + STY JITCODE STY JITCOMP STY JITCOMP+1 - STY PPL - STY IFPL ; INIT FRAME POINTER - STY JITCODE LDA #$AF STA PPH STA IFPH @@ -46,7 +46,6 @@ JITCODE = $03E4 LDX #$FE ; INIT STACK POINTER (YES, $FE. SEE GETS) TXS LDX #ESTKSZ/2 ; INIT EVAL STACK INDEX - JMP $1000 _CMDBEGIN = * !PSEUDOPC $1000 { diff --git a/src/vmsrc/apple/cmdstub.s b/src/vmsrc/apple/cmdstub.s index deae3cc..ff00909 100644 --- a/src/vmsrc/apple/cmdstub.s +++ b/src/vmsrc/apple/cmdstub.s @@ -1,48 +1,48 @@ -INTERP = $03D0 -LCRDEN = $C080 -LCWTEN = $C081 -ROMEN = $C082 -LCRWEN = $C083 -LCBNK2 = $00 -LCBNK1 = $08 +INTERP = $03D0 +LCRDEN = $C080 +LCWTEN = $C081 +ROMEN = $C082 +LCRWEN = $C083 +LCBNK2 = $00 +LCBNK1 = $08 !SOURCE "vmsrc/plvmzp.inc" ;* ;* MOVE CMD DOWN TO $1000-$2000 ;* - LDA #<_CMDBEGIN - STA SRCL - LDA #>_CMDBEGIN - STA SRCH - LDY #$00 - STY DSTL - LDX #$10 - STX DSTH -- LDA (SRC),Y - STA (DST),Y - INY - BNE - - INC SRCH - INC DSTH - DEX ; STOP WHEN DST=$2000 REACHED - BNE - - LDA #<_CMDEND - STA SRCL - LDA #>_CMDEND - STA SRCH + LDA #<_CMDBEGIN + STA SRCL + LDA #>_CMDBEGIN + STA SRCH + LDY #$00 + STY DSTL + LDX #$10 + STX DSTH +- LDA (SRC),Y + STA (DST),Y + INY + BNE - + INC SRCH + INC DSTH + DEX ; STOP WHEN DST=$2000 REACHED + BNE - + LDA #<_CMDEND + STA SRCL + LDA #>_CMDEND + STA SRCH ; ; INIT VM ENVIRONMENT STACK POINTERS ; - STY PPL - STY IFPL ; INIT FRAME POINTER - LDA #$BF - STA PPH - STA IFPH - LDX #$FE ; INIT STACK POINTER (YES, $FE. SEE GETS) - TXS - LDX #ESTKSZ/2 ; INIT EVAL STACK INDEX - JMP $1000 + STY PPL + STY IFPL ; INIT FRAME POINTER = $BF00 + LDA #$BF + STA PPH + STA IFPH + LDX #$FE ; INIT STACK POINTER (YES, $FE. SEE GETS) + TXS + LDX #ESTKSZ/2 ; INIT EVAL STACK INDEX + JMP $1000 _CMDBEGIN = * - !PSEUDOPC $1000 { - !SOURCE "vmsrc/apple/cmd.a" + !PSEUDOPC $1000 { + !SOURCE "vmsrc/apple/cmd.a" _CMDEND = * } diff --git a/src/vmsrc/apple/plvm02.s b/src/vmsrc/apple/plvm02.s index abb60cb..cf61fbb 100755 --- a/src/vmsrc/apple/plvm02.s +++ b/src/vmsrc/apple/plvm02.s @@ -1,11 +1,10 @@ ;********************************************************** ;* -;* APPLE ][ 64K/128K PLASMA INTERPRETER +;* APPLE ][ 64K PLASMA INTERPRETER ;* ;* SYSTEM ROUTINES AND LOCATIONS ;* ;********************************************************** - !CPU 65C02 ;* ;* MONITOR SPECIAL LOCATIONS ;* @@ -16,11 +15,7 @@ PROMPT = $33 ;* PRODOS ;* PRODOS = $BF00 -DEVCNT = $BF31 ; GLOBAL PAGE DEVICE COUNT -DEVLST = $BF32 ; GLOBAL PAGE DEVICE LIST MACHID = $BF98 ; GLOBAL PAGE MACHINE ID BYTE -RAMSLOT = $BF26 ; SLOT 3, DRIVE 2 IS /RAM'S DRIVER VECTOR -NODEV = $BF10 ;* ;* HARDWARE ADDRESSES ;* @@ -33,12 +28,6 @@ ROMEN = $C082 LCRWEN = $C083 LCBNK2 = $00 LCBNK1 = $08 -ALTZPOFF= $C008 -ALTZPON = $C009 -ALTRDOFF= $C002 -ALTRDON = $C003 -ALTWROFF= $C004 -ALTWRON = $C005 !SOURCE "vmsrc/plvmzp.inc" PSR = TMP+2 DVSIGN = PSR+1 @@ -58,47 +47,23 @@ INTERP = $03D0 ;* * ;****************************** * = $2000 - LDX #$FE - TXS - LDX #$00 - STX $01FF ;* -;* DISCONNECT /RAM +;* CHECK FOR ALTERNTATIVE VM IMPEMENTATIONS ;* - ;SEI ; DISABLE /RAM - LDA MACHID + LDA MACHID ; CHECK FOR 128K AND #$30 CMP #$30 - BNE RAMDONE - LDA RAMSLOT - CMP NODEV - BNE RAMCONT - LDA RAMSLOT+1 - CMP NODEV+1 - BEQ RAMDONE -RAMCONT LDY DEVCNT -RAMLOOP LDA DEVLST,Y - AND #$F3 - CMP #$B3 - BEQ GETLOOP - DEY - BPL RAMLOOP - BMI RAMDONE -GETLOOP LDA DEVLST+1,Y - STA DEVLST,Y - BEQ RAMEXIT + BNE + + LDY #$00 +- LDA ALTVM,Y + STA $1000,Y INY - BNE GETLOOP -RAMEXIT LDA NODEV - STA RAMSLOT - LDA NODEV+1 - STA RAMSLOT+1 - DEC DEVCNT -RAMDONE ;CLI UNTIL I KNOW WHAT TO DO WITH THE UNENHANCED IIE + BNE - + JSR $1000 ; TRY AND LOAD ALT VM ;* ;* MOVE VM INTO LANGUAGE CARD ;* - BIT LCRWEN+LCBNK2 ++ BIT LCRWEN+LCBNK2 BIT LCRWEN+LCBNK2 LDA #ENTER64 - STA OPTBL+$59 - LDA #LEAVE64 - STA OPTBL+$5B -;* ;* SAVE DEFAULT COMMAND INTERPRETER PATH IN LC ;* + JSR PRODOS ; GET PREFIX @@ -205,7 +145,19 @@ OPTBL !WORD CN,CN,CN,CN,CN,CN,CN,CN ; 00 02 !WORD NEG,COMP,BAND,IOR,XOR,SHL,SHR,IDXW ; 90 92 94 96 98 9A 9C 9E !WORD BRGT,BRLT,INCBRLE,ADDBRLE,DECBRGE,SUBBRGE,BRAND,BROR ; A0 A2 A4 A6 A8 AA AC AE !WORD ADDLB,ADDLW,ADDAB,ADDAW,IDXLB,IDXLW,IDXAB,IDXAW ; B0 B2 B4 B6 B8 BA BC BE + !WORD NATV ; C0 ;* +;* DIRECTLY ENTER INTO BYTECODE INTERPRETER +;* +DINTRP PLA + CLC + ADC #$01 + STA IPL + PLA + ADC #$00 + STA IPH + LDY #$00 + JMP FETCHOP ;* ;* INDIRECTLY ENTER INTO BYTECODE INTERPRETER ;* @@ -220,27 +172,6 @@ IINTRP PLA LDA (TMP),Y STA IPL DEY -+ LDA #>OPTBL - STA OPPAGE - JMP FETCHOP -IINTRPX PHP - PLA - STA PSR - SEI - PLA - STA TMPL - PLA - STA TMPH - LDY #$02 - LDA (TMP),Y - STA IPH - DEY - LDA (TMP),Y - STA IPL - DEY - LDA #>OPXTBL - STA OPPAGE - STA ALTRDON JMP FETCHOP ;************************************************************ ;* * @@ -287,7 +218,7 @@ CMDENTRY = * ; ; INSTALL PAGE 3 VECTORS ; - LDY #$12 + LDY #$0C - LDA PAGE3,Y STA INTERP,Y DEY @@ -381,46 +312,11 @@ PAGE3 = * JMP DINTRP BIT LCRDEN+LCBNK2 ; $03D6 - INDIRECT INTERP ENTRY JMP IINTRP - BIT LCRDEN+LCBNK2 ; $03DC - INDIRECT INTERPX ENTRY - JMP IINTRPX } DEFCMD = * ;!FILL 28 ENDBYE = * } LCDEFCMD = * ;*-28 ; DEFCMD IN LC MEMORY -;***************** -;* * -;* OPXCODE TABLE * -;* * -;***************** - !ALIGN 255,0 -OPXTBL !WORD CN,CN,CN,CN,CN,CN,CN,CN ; 00 02 04 06 08 0A 0C 0E - !WORD CN,CN,CN,CN,CN,CN,CN,CN ; 10 12 14 16 18 1A 1C 1E - !WORD MINUS1,BREQ,BRNE,LA,LLA,CB,CW,CSX ; 20 22 24 26 28 2A 2C 2E - !WORD DROP,DROP2,DUP,DIVMOD,ADDI,SUBI,ANDI,ORI ; 30 32 34 36 38 3A 3C 3E - !WORD ISEQ,ISNE,ISGT,ISLT,ISGE,ISLE,BRFLS,BRTRU ; 40 42 44 46 48 4A 4C 4E - !WORD BRNCH,SEL,CALLX,ICALX,ENTER,LEAVEX,RETX,CFFB ; 50 52 54 56 58 5A 5C 5E - !WORD LBX,LWX,LLBX,LLWX,LABX,LAWX,DLB,DLW ; 60 62 64 66 68 6A 6C 6E - !WORD SB,SW,SLB,SLW,SAB,SAW,DAB,DAW ; 70 72 74 76 78 7A 7C 7E - !WORD LNOT,ADD,SUB,MUL,DIV,MOD,INCR,DECR ; 80 82 84 86 88 8A 8C 8E - !WORD NEG,COMP,BAND,IOR,XOR,SHL,SHR,IDXW ; 90 92 94 96 98 9A 9C 9E - !WORD BRGT,BRLT,INCBRLE,ADDBRLE,DECBRGE,SUBBRGE,BRAND,BROR ; A0 A2 A4 A6 A8 AA AC AE - !WORD ADDLBX,ADDLWX,ADDABX,ADDAWX,IDXLBX,IDXLWX,IDXABX,IDXAWX ; B0 B2 B4 B6 B8 BA BC BE -;* -;* -;* DIRECTLY ENTER INTO BYTECODE INTERPRETER -;* -DINTRP PLA - CLC - ADC #$01 - STA IPL - PLA - ADC #$00 - STA IPH - LDY #$00 - LDA #>OPTBL - STA OPPAGE - JMP FETCHOP ;* ;* ADD TOS TO TOS-1 ;* @@ -822,76 +718,6 @@ CS DEX LDA (IP),Y TAY JMP NEXTOP -CSX DEX - ;INY ;+INC_IP - TYA ; NORMALIZE IP - SEC - ADC IPL - STA IPL - LDA #$00 - TAY - ADC IPH - STA IPH - LDA PPL ; SCAN POOL FOR STRING ALREADY THERE - STA TMPL - LDA PPH - STA TMPH -_CMPPSX ;LDA TMPH ; CHECK FOR END OF POOL - CMP IFPH - BCC _CMPSX ; CHECK FOR MATCHING STRING - BNE _CPYSX ; BEYOND END OF POOL, COPY STRING OVER - LDA TMPL - CMP IFPL - BCS _CPYSX ; AT OR BEYOND END OF POOL, COPY STRING OVER -_CMPSX STA ALTRDOFF - LDA (TMP),Y ; COMPARE STRINGS FROM AUX MEM TO STRINGS IN MAIN MEM - STA ALTRDON - CMP (IP),Y ; COMPARE STRING LENGTHS - BNE _CNXTSX1 - TAY -_CMPCSX STA ALTRDOFF - LDA (TMP),Y ; COMPARE STRING CHARS FROM END - STA ALTRDON - CMP (IP),Y - BNE _CNXTSX - DEY - BNE _CMPCSX - LDA TMPL ; MATCH - SAVE EXISTING ADDR ON ESTK AND MOVE ON - STA ESTKL,X - LDA TMPH - STA ESTKH,X - BNE _CEXSX -_CNXTSX LDY #$00 - STA ALTRDOFF - LDA (TMP),Y - STA ALTRDON -_CNXTSX1 SEC - ADC TMPL - STA TMPL - LDA #$00 - ADC TMPH - STA TMPH - BNE _CMPPSX -_CPYSX LDA (IP),Y ; COPY STRING FROM AUX TO MAIN MEM POOL - TAY ; MAKE ROOM IN POOL AND SAVE ADDR ON ESTK - EOR #$FF - CLC - ADC PPL - STA PPL - STA ESTKL,X - LDA #$FF - ADC PPH - STA PPH - STA ESTKH,X ; COPY STRING FROM AUX MEM BYTECODE TO MAIN MEM POOL -_CPYSX1 LDA (IP),Y ; ALTRD IS ON, NO NEED TO CHANGE IT HERE - STA (PP),Y ; ALTWR IS OFF, NO NEED TO CHANGE IT HERE - DEY - CPY #$FF - BNE _CPYSX1 - INY -_CEXSX LDA (IP),Y ; SKIP TO NEXT OP ADDR AFTER STRING - TAY - JMP NEXTOP ;* ;* LOAD VALUE FROM ADDRESS TAG ;* @@ -915,31 +741,6 @@ LW LDA ESTKL,X LDA (ESTKH-1,X) STA ESTKH,X JMP NEXTOP -LBX LDA ESTKL,X - STA ESTKH-1,X - STA ALTRDOFF - LDA (ESTKH-1,X) - STA ESTKL,X - LDA #$00 - STA ESTKH,X - STA ALTRDON - JMP NEXTOP -LWX LDA ESTKL,X - STA ESTKH-1,X - STA ALTRDOFF - LDA (ESTKH-1,X) - STA ESTKL,X - INC ESTKH-1,X - BEQ + - LDA (ESTKH-1,X) - STA ESTKH,X - STA ALTRDON - JMP NEXTOP -+ INC ESTKH,X - LDA (ESTKH-1,X) - STA ESTKH,X - STA ALTRDON - JMP NEXTOP ;* ;* LOAD ADDRESS OF LOCAL FRAME OFFSET ;* @@ -987,33 +788,6 @@ LLW INY ;+INC_IP STA ESTKH,X LDY IPY JMP NEXTOP -LLBX INY ;+INC_IP - LDA (IP),Y - STY IPY - TAY - DEX - STA ALTRDOFF - LDA (IFP),Y - STA ESTKL,X - LDA #$00 - STA ESTKH,X - STA ALTRDON - LDY IPY - JMP NEXTOP -LLWX INY ;+INC_IP - LDA (IP),Y - STY IPY - TAY - DEX - STA ALTRDOFF - LDA (IFP),Y - STA ESTKL,X - INY - LDA (IFP),Y - STA ESTKH,X - STA ALTRDON - LDY IPY - JMP NEXTOP ;* ;* ADD VALUE FROM LOCAL FRAME OFFSET ;* @@ -1029,20 +803,6 @@ ADDLB INY ;+INC_IP INC ESTKH,X + LDY IPY JMP NEXTOP -ADDLBX INY ;+INC_IP - LDA (IP),Y - STY IPY - TAY - STA ALTRDOFF - LDA (IFP),Y - CLC - ADC ESTKL,X - STA ESTKL,X - BCC + - INC ESTKH,X -+ STA ALTRDON - LDY IPY - JMP NEXTOP ADDLW INY ;+INC_IP LDA (IP),Y STY IPY @@ -1057,22 +817,6 @@ ADDLW INY ;+INC_IP STA ESTKH,X LDY IPY JMP NEXTOP -ADDLWX INY ;+INC_IP - LDA (IP),Y - STY IPY - TAY - STA ALTRDOFF - LDA (IFP),Y - CLC - ADC ESTKL,X - STA ESTKL,X - INY - LDA (IFP),Y - ADC ESTKH,X - STA ESTKH,X - STA ALTRDON - LDY IPY - JMP NEXTOP ;* ;* INDEX VALUE FROM LOCAL FRAME OFFSET ;* @@ -1093,25 +837,6 @@ IDXLB INY ;+INC_IP STA ESTKH,X LDY IPY JMP NEXTOP -IDXLBX INY ;+INC_IP - LDA (IP),Y - STY IPY - TAY - STA ALTRDOFF - LDA (IFP),Y - LDY #$00 - ASL - BCC + - INY - CLC -+ ADC ESTKL,X - STA ESTKL,X - TYA - ADC ESTKH,X - STA ESTKH,X - STA ALTRDON - LDY IPY - JMP NEXTOP IDXLW INY ;+INC_IP LDA (IP),Y STY IPY @@ -1132,28 +857,6 @@ IDXLW INY ;+INC_IP STA ESTKH,X LDY IPY JMP NEXTOP -IDXLWX INY ;+INC_IP - LDA (IP),Y - STY IPY - TAY - STA ALTRDOFF - LDA (IFP),Y - ASL - STA TMPL - INY - LDA (IFP),Y - ROL - STA TMPH - LDA TMPL - CLC - ADC ESTKL,X - STA ESTKL,X - LDA TMPH - ADC ESTKH,X - STA ESTKH,X - STA ALTRDON - LDY IPY - JMP NEXTOP ;* ;* LOAD VALUE FROM ABSOLUTE ADDRESS ;* @@ -1185,38 +888,6 @@ LAW INY ;+INC_IP STA ESTKH,X LDY IPY JMP NEXTOP -LABX INY ;+INC_IP - LDA (IP),Y - STA ESTKH-2,X - INY ;+INC_IP - LDA (IP),Y - STA ESTKH-1,X - STA ALTRDOFF - LDA (ESTKH-2,X) - DEX - STA ESTKL,X - LDA #$00 - STA ESTKH,X - STA ALTRDON - JMP NEXTOP -LAWX INY ;+INC_IP - LDA (IP),Y - STA TMPL - INY ;+INC_IP - LDA (IP),Y - STA TMPH - STY IPY - STA ALTRDOFF - LDY #$00 - LDA (TMP),Y - DEX - STA ESTKL,X - INY - LDA (TMP),Y - STA ESTKH,X - STA ALTRDON - LDY IPY - JMP NEXTOP ;* ;* ADD VALUE FROM ABSOLUTE ADDRESS ;* @@ -1233,21 +904,6 @@ ADDAB INY ;+INC_IP BCC + INC ESTKH,X + JMP NEXTOP -ADDABX INY ;+INC_IP - LDA (IP),Y - STA ESTKH-2,X - INY ;+INC_IP - LDA (IP),Y - STA ESTKH-1,X - STA ALTRDOFF - LDA (ESTKH-2,X) - CLC - ADC ESTKL,X - STA ESTKL,X - BCC + - INC ESTKH,X -+ STA ALTRDON - JMP NEXTOP ADDAW INY ;+INC_IP LDA (IP),Y STA SRCL @@ -1266,26 +922,6 @@ ADDAW INY ;+INC_IP STA ESTKH,X LDY IPY JMP NEXTOP -ADDAWX INY ;+INC_IP - LDA (IP),Y - STA SRCL - INY ;+INC_IP - LDA (IP),Y - STA SRCH - STY IPY - STA ALTRDOFF - LDY #$00 - LDA (SRC),Y - CLC - ADC ESTKL,X - STA ESTKL,X - INY - LDA (SRC),Y - ADC ESTKH,X - STA ESTKH,X - STA ALTRDON - LDY IPY - JMP NEXTOP ;* ;* INDEX VALUE FROM ABSOLUTE ADDRESS ;* @@ -1309,28 +945,6 @@ IDXAB INY ;+INC_IP STA ESTKH,X LDY IPY JMP NEXTOP -IDXABX INY ;+INC_IP - LDA (IP),Y - STA ESTKH-2,X - INY ;+INC_IP - LDA (IP),Y - STA ESTKH-1,X - STA ALTRDOFF - LDA (ESTKH-2,X) - STY IPY - LDY #$00 - ASL - BCC + - INY - CLC -+ ADC ESTKL,X - STA ESTKL,X - TYA - ADC ESTKH,X - STA ESTKH,X - LDY IPY - STA ALTRDON - JMP NEXTOP IDXAW INY ;+INC_IP LDA (IP),Y STA SRCL @@ -1355,32 +969,6 @@ IDXAW INY ;+INC_IP STA ESTKH,X LDY IPY JMP NEXTOP -IDXAWX INY ;+INC_IP - LDA (IP),Y - STA SRCL - INY ;+INC_IP - LDA (IP),Y - STA SRCH - STY IPY - STA ALTRDOFF - LDY #$00 - LDA (SRC),Y - ASL - STA TMPL - INY - LDA (SRC),Y - ROL - STA TMPH - LDA TMPL - CLC - ADC ESTKL,X - STA ESTKL,X - LDA TMPH - ADC ESTKH,X - STA ESTKH,X - STA ALTRDON - LDY IPY - JMP NEXTOP ;* ;* STORE VALUE TO ADDRESS ;* @@ -1808,37 +1396,6 @@ CALL INY ;+INC_IP STA OPPAGE LDY #$00 JMP FETCHOP -CALLX INY ;+INC_IP - LDA (IP),Y - STA TMPL - INY ;+INC_IP - LDA (IP),Y - STA TMPH - TYA - SEC - ADC IPL - PHA - LDA IPH - ADC #$00 - PHA - STA ALTRDOFF - LDA PSR - PHA - PLP - JSR JMPTMP - PHP - PLA - STA PSR - SEI - STA ALTRDON - PLA - STA IPH - PLA - STA IPL - LDA #>OPXTBL ; MAKE SURE WE'RE INDEXING THE RIGHT TABLE - STA OPPAGE - LDY #$00 - JMP FETCHOP ;* ;* INDIRECT CALL TO ADDRESS (NATIVE CODE) ;* @@ -1863,43 +1420,10 @@ ICAL LDA ESTKL,X STA OPPAGE LDY #$00 JMP FETCHOP -ICALX LDA ESTKL,X - STA TMPL - LDA ESTKH,X - STA TMPH - INX - TYA - SEC - ADC IPL - PHA - LDA IPH - ADC #$00 - PHA - STA ALTRDOFF - LDA PSR - PHA - PLP - JSR JMPTMP - PHP - PLA - STA PSR - STA ALTRDON - PLA - STA IPH - PLA - STA IPL - LDA #>OPXTBL ; MAKE SURE WE'RE INDEXING THE RIGHT TABLE - STA OPPAGE - LDY #$0 - JMP FETCHOP -;* -;* JUMP INDIRECT TRHOUGH TMP -;* -;JMPTMP JMP (TMP) ;* ;* ENTER FUNCTION WITH FRAME SIZE AND PARAM COUNT ;* -ENTER64 INY +ENTER INY LDA (IP),Y EOR #$FF SEC @@ -1922,57 +1446,10 @@ ENTER64 INY BNE - + LDY #$03 JMP FETCHOP -ENTER LDA IFPH - PHA ; SAVE ON STACK FOR LEAVE - LDA IFPL - PHA - INY - LDA (IP),Y - EOR #$FF ; ALLOCATE FRAME - SEC - ADC PPL - STA PPL - STA IFPL - LDA #$FF - ADC PPH - STA PPH - STA IFPH - INY - LDA (IP),Y - BEQ + - ASL - TAY -- LDA ESTKH,X - DEY - STA (IFP),Y - LDA ESTKL,X - INX - DEY - STA (IFP),Y - BNE - -+ LDY #$03 - JMP FETCHOP ;* ;* LEAVE FUNCTION ;* -LEAVEX INY ;+INC_IP - LDA (IP),Y - CLC - ADC IFPL - STA PPL - LDA #$00 - ADC IFPH - STA PPH - PLA ; RESTORE PREVIOUS FRAME - STA IFPL - PLA - STA IFPH -RETX STA ALTRDOFF - LDA PSR - PHA - PLP - RTS -LEAVE64 INY ;+INC_IP +LEAVE INY ;+INC_IP LDA (IP),Y CLC ADC IFPL @@ -1980,380 +1457,69 @@ LEAVE64 INY ;+INC_IP BCS + RTS + INC IFPH - RTS -LEAVE INY ;+INC_IP - LDA (IP),Y - CLC - ADC IFPL - STA PPL - LDA #$00 - ADC IFPH - STA PPH - PLA ; RESTORE PREVIOUS FRAME - STA IFPL - PLA - STA IFPH RET RTS +;* +;* RETURN TO NATIVE CODE +;* +NATV TYA ; FLATTEN IP + SEC + ADC IPL + STA IPL + LDA #$00 + ADC IPH + STA IPH + JMP (IP) VMEND = * } -;*************************************** -;* * -;* 65C02 OPS TO OVERWRITE STANDARD OPS * -;* * -;*************************************** -C02OPS LDA #DINTRP - LDY #(CDINTRPEND-CDINTRP) - JSR OPCPY -CDINTRP PLY - PLA - INY - BNE + - INC -+ STY IPL - STA IPH - LDY #$00 - LDA #>OPTBL - STA OPPAGE - JMP FETCHOP -CDINTRPEND -; - LDA #CN - LDY #(CCNEND-CCN) - JSR OPCPY -CCN DEX - LSR - STA ESTKL,X - STZ ESTKH,X - JMP NEXTOP -CCNEND -; - LDA #CB - LDY #(CCBEND-CCB) - JSR OPCPY -CCB DEX - STZ ESTKH,X - INY - LDA (IP),Y - STA ESTKL,X - JMP NEXTOP -CCBEND -; - LDA #CS - LDY #(CCSEND-CCS) - JSR OPCPY -CCS DEX - ;INY ;+INC_IP - TYA ; NORMALIZE IP AND SAVE STRING ADDR ON ESTK - SEC - ADC IPL - STA IPL - STA ESTKL,X - LDA #$00 - ADC IPH - STA IPH - STA ESTKH,X - LDA (IP) - TAY - JMP NEXTOP -CCSEND -; - LDA #SHL - LDY #(CSHLEND-CSHL) - JSR OPCPY -CSHL STY IPY - LDA ESTKL,X - CMP #$08 - BCC + - LDY ESTKL+1,X - STY ESTKH+1,X - STZ ESTKL+1,X - SBC #$08 -+ TAY - BEQ + - LDA ESTKL+1,X -- ASL - ROL ESTKH+1,X - DEY - BNE - - STA ESTKL+1,X -+ LDY IPY - JMP DROP -CSHLEND -; - LDA #LB - LDY #(CLBEND-CLB) - JSR OPCPY -CLB LDA ESTKL,X - STA ESTKH-1,X - LDA (ESTKH-1,X) - STA ESTKL,X - STZ ESTKH,X - JMP NEXTOP -CLBEND -; - LDA #LBX - LDY #(CLBXEND-CLBX) - JSR OPCPY -CLBX LDA ESTKL,X - STA ESTKH-1,X - STA ALTRDOFF - LDA (ESTKH-1,X) - STA ESTKL,X - STZ ESTKH,X - STA ALTRDON - JMP NEXTOP -CLBXEND -; - LDA #LLB - LDY #(CLLBEND-CLLB) - JSR OPCPY -CLLB INY ;+INC_IP - LDA (IP),Y - STY IPY - TAY - DEX - LDA (IFP),Y - STA ESTKL,X - STZ ESTKH,X - LDY IPY - JMP NEXTOP -CLLBEND -; - LDA #LLBX - LDY #(CLLBXEND-CLLBX) - JSR OPCPY -CLLBX INY ;+INC_IP - LDA (IP),Y - STY IPY - TAY - DEX - STA ALTRDOFF - LDA (IFP),Y - STA ESTKL,X - STZ ESTKH,X - STA ALTRDON - LDY IPY - JMP NEXTOP -CLLBXEND -; - LDA #LAB - LDY #(CLABEND-CLAB) - JSR OPCPY -CLAB INY ;+INC_IP - LDA (IP),Y - STA ESTKH-2,X - INY ;+INC_IP - LDA (IP),Y - STA ESTKH-1,X - LDA (ESTKH-2,X) - DEX - STA ESTKL,X - STZ ESTKH,X - JMP NEXTOP -CLABEND -; - LDA #LAW - LDY #(CLAWEND-CLAW) - JSR OPCPY -CLAW INY ;+INC_IP - LDA (IP),Y - STA TMPL - INY ;+INC_IP - LDA (IP),Y - STA TMPH - STY IPY - LDA (TMP) - DEX - STA ESTKL,X - LDY #$01 - LDA (TMP),Y - STA ESTKH,X - LDY IPY - JMP NEXTOP -CLAWEND -; - LDA #LABX - LDY #(CLABXEND-CLABX) - JSR OPCPY -CLABX INY ;+INC_IP - LDA (IP),Y - STA ESTKH-2,X - INY ;+INC_IP - LDA (IP),Y - STA ESTKH-1,X - STA ALTRDOFF - LDA (ESTKH-2,X) - DEX - STA ESTKL,X - STZ ESTKH,X - STA ALTRDON - JMP NEXTOP -CLABXEND -; - LDA #LAWX - LDY #(CLAWXEND-CLAWX) - JSR OPCPY -CLAWX INY ;+INC_IP - LDA (IP),Y - STA TMPL - INY ;+INC_IP - LDA (IP),Y - STA TMPH - STY IPY - STA ALTRDOFF - LDA (TMP) - DEX - STA ESTKL,X - LDY #$01 - LDA (TMP),Y - STA ESTKH,X - STA ALTRDON - LDY IPY - JMP NEXTOP -CLAWXEND -; - LDA #SAW - LDY #(CSAWEND-CSAW) - JSR OPCPY -CSAW INY ;+INC_IP - LDA (IP),Y - STA TMPL - INY ;+INC_IP - LDA (IP),Y - STA TMPH - STY IPY - LDA ESTKL,X - STA (TMP) - LDY #$01 - LDA ESTKH,X - STA (TMP),Y - LDY IPY - BMI + - JMP DROP -+ JMP FIXDROP -CSAWEND -; - LDA #DAW - LDY #(CDAWEND-CDAW) - JSR OPCPY -CDAW INY ;+INC_IP - LDA (IP),Y - STA TMPL - INY ;+INC_IP - LDA (IP),Y - STA TMPH - STY IPY - LDA ESTKL,X - STA (TMP) - LDY #$01 - LDA ESTKH,X - STA (TMP),Y - LDY IPY - JMP NEXTOP -CDAWEND -; - LDA #DAB - LDY #(CDABEND-CDAB) - JSR OPCPY -CDAB INY ;+INC_IP - LDA (IP),Y - STA ESTKH-2,X - INY ;+INC_IP - LDA (IP),Y - STA ESTKH-1,X - LDA ESTKL,X - STA (ESTKH-2,X) - STZ ESTKH,X - JMP NEXTOP -CDABEND -; - LDA #DLB - LDY #(CDLBEND-CDLB) - JSR OPCPY -CDLB INY ;+INC_IP - LDA (IP),Y - STY IPY - TAY - LDA ESTKL,X - STA (IFP),Y - STZ ESTKH,X - LDY IPY - JMP NEXTOP -CDLBEND -; - LDA #ISFLS - LDY #(CISFLSEND-CISFLS) - JSR OPCPY -CISFLS STZ ESTKL+1,X - STZ ESTKH+1,X - JMP DROP -CISFLSEND -; - LDA #BRNCH - LDY #(CBRNCHEND-CBRNCH) - JSR OPCPY -CBRNCH TYA ; FLATTEN IP - SEC - ADC IPL - STA TMPL - LDA #$00 - ADC IPH - STA TMPH ; ADD BRANCH OFFSET - LDA (TMP) - ;CLC ; BETTER NOT CARRY OUT OF IP+Y - ADC TMPL - STA IPL - LDY #$01 - LDA (TMP),Y - ADC TMPH - STA IPH - DEY - JMP FETCHOP -CBRNCHEND -; - RTS -;* -;* COPY OP TO VM -;* -OPCPY STA DST - STX DST+1 - PLA - STA SRC - PLA - STA SRC+1 - TYA +;************************************************ +;* * +;* ALTERNATIVE VM LOAD * +;* * +;************************************************ +ALTVM = * + !PSEUDOPC $1000 { + !CPU 65816 CLC - ADC SRC - TAX - LDA #$00 - ADC SRC+1 - PHA - PHX - INC SRC - BNE + - INC SRC+1 -+ DEY -- LDA (SRC),Y - STA (DST),Y - DEY - BPL - - RTS + XCE ; TRY SWITCH TO NATIVE MODE + BCC + ; NOT 65802/65816 IF CARRY CLEAR + XCE ; SWITCH BACK TO EMULATED MODE + LDA #VM16 + STA OPENVM+1 + JSR + + LDA #VM128 + STA OPENVM+1 ++ JSR PRODOS ; OPEN CMD + !BYTE $C8 + !WORD OPENVM + BNE NOVM + LDA REFVM + STA READVM+1 + JSR PRODOS + !BYTE $CA + !WORD READVM + BNE NOVM + JSR PRODOS + !BYTE $CC + !WORD CLOSEVM + BNE NOVM + JMP $2000 ; JUMP TO ALT VM +NOVM RTS +OPENVM !BYTE 3 + !WORD VM128 + !WORD $0800 +REFVM !BYTE 0 +READVM !BYTE 4 + !BYTE 0 + !WORD $2000 + !WORD $9F00 + !WORD 0 +CLOSEVM !BYTE 1 + !BYTE 0 +VM128 !BYTE 8, 'P', 'L', 'V', 'M', '-', '1', '2', '8' +VM16 !BYTE 6, 'P', 'L', 'V', 'M', '1', '6' + !CPU 6502 +} diff --git a/src/vmsrc/apple/plvm802.s b/src/vmsrc/apple/plvm802.s index ed319bb..b05c283 100644 --- a/src/vmsrc/apple/plvm802.s +++ b/src/vmsrc/apple/plvm802.s @@ -97,7 +97,7 @@ NOS = $03 ; TOS-1 ;* INTERPRETER INITIALIZATION * ;* * ;****************************** -* = $2000 +* = $2000 ;* ;* MUST HAVE 128K FOR JIT ;* @@ -143,13 +143,6 @@ BADCPU !TEXT "65C802/65C816 CPU REQUIRED.", 13 ANYKEY !TEXT "PRESS ANY KEY...", 0 ++ XCE ; SWITCH BACK TO EMULATED MODE -;* -;* INITIALIZE STACK -;* -;INITSP LDX #$FE -; TXS -; LDX #$00 -; STX $01FF ;* ;* DISCONNECT /RAM ;* @@ -196,7 +189,7 @@ RAMDONE ;CLI UNTIL I KNOW WHAT TO DO WITH THE UNENHANCED IIE STY DSTL LDA #$D0 STA DSTH -- LDA (SRC),Y ; COPY VM+CMD INTO LANGUAGE CARD +- LDA (SRC),Y ; COPY VM+BYE INTO LANGUAGE CARD STA (DST),Y INY BNE - @@ -208,10 +201,7 @@ RAMDONE ;CLI UNTIL I KNOW WHAT TO DO WITH THE UNENHANCED IIE ;* ;* MOVE FIRST PAGE OF 'BYE' INTO PLACE ;* - STY SRCL - LDA #$D1 - STA SRCH -- LDA (SRC),Y +- LDA $D100,Y STA $1000,Y INY BNE - @@ -236,13 +226,13 @@ RAMDONE ;CLI UNTIL I KNOW WHAT TO DO WITH THE UNENHANCED IIE LDA #"D" INY STA STRBUF,Y - LDA #"J" + LDA #"1" INY STA STRBUF,Y - LDA #"I" + LDA #"2" INY STA STRBUF,Y - LDA #"T" + LDA #"8" INY STA STRBUF,Y STY STRBUF diff --git a/src/vmsrc/apple/plvmjit02.s b/src/vmsrc/apple/plvmjit02.s index 2d75e7c..b9f516b 100755 --- a/src/vmsrc/apple/plvmjit02.s +++ b/src/vmsrc/apple/plvmjit02.s @@ -1,6 +1,6 @@ ;********************************************************** ;* -;* APPLE ][ 64K/128K PLASMA INTERPRETER +;* APPLE ][ 128K PLASMA INTERPRETER ;* ;* SYSTEM ROUTINES AND LOCATIONS ;* @@ -61,10 +61,6 @@ JITCODE = $03E4 ;* * ;****************************** * = $2000 - LDX #$FE - TXS - LDX #$00 - STX $01FF ;* ;* MUST HAVE 128K FOR JIT ;* @@ -134,7 +130,7 @@ RAMDONE ;CLI UNTIL I KNOW WHAT TO DO WITH THE UNENHANCED IIE STY DSTL LDA #$D0 STA DSTH -- LDA (SRC),Y ; COPY VM+CMD INTO LANGUAGE CARD +- LDA (SRC),Y ; COPY VM+BYE INTO LANGUAGE CARD STA (DST),Y INY BNE - @@ -146,10 +142,7 @@ RAMDONE ;CLI UNTIL I KNOW WHAT TO DO WITH THE UNENHANCED IIE ;* ;* MOVE FIRST PAGE OF 'BYE' INTO PLACE ;* - STY SRCL - LDA #$D1 - STA SRCH -- LDA (SRC),Y +- LDA $D100,Y STA $1000,Y INY BNE - @@ -181,13 +174,13 @@ RAMDONE ;CLI UNTIL I KNOW WHAT TO DO WITH THE UNENHANCED IIE LDA #"D" INY STA STRBUF,Y - LDA #"J" + LDA #"1" INY STA STRBUF,Y - LDA #"I" + LDA #"2" INY STA STRBUF,Y - LDA #"T" + LDA #"8" INY STA STRBUF,Y STY STRBUF @@ -2035,11 +2028,11 @@ RET RTS NATV TYA ; FLATTEN IP SEC ADC IPL - STA TMPL + STA IPL LDA #$00 ADC IPH - STA TMPH - JMP JMPTMP + STA IPH + JMP (IP) VMEND = * } ;*************************************** From b5c30d524efcd726fb19d08b449e6afecacbe68e Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Fri, 13 Apr 2018 12:21:04 -0700 Subject: [PATCH 17/74] update images --- PLASMA-BLD2.PO | Bin 143360 -> 143360 bytes PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes src/makefile | 2 +- src/mkrel | 6 +++--- src/vmsrc/apple/plvm02.s | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/PLASMA-BLD2.PO b/PLASMA-BLD2.PO index 11b5ee117cfc1f75a154a96c52513a20ae78e74b..acf572f4832760742ace2a78108b1760810ce325 100644 GIT binary patch delta 102 zcmZp8z|ru4V}k?>pO_#6gT9J79|OZQh z;TR)BkBX>Z!M^7VK!(`ncJ|pUjP;utneH++@wM?WZsTKO5@IiBSirEI;m3AP1*Y%( E0P%Gh-T(jq delta 102 zcmZp8z|ru4V}k?>pD7;$gT9J7kbJDpE4o>Y#g+RXZRb>A`pypk D|1=q~ diff --git a/PLASMA-SYS2.PO b/PLASMA-SYS2.PO index d42d1c2393196e38ad9a4044d0249de009c9b941..daf6b25c4d9fee32a7aeffbe4e7c2aa999840eb5 100755 GIT binary patch delta 3898 zcmaJ@30zZ09-eu53E>Ja5WIR3?YT!)mo_wuXy26jIKR`N4B(u zU3H|?u9h^`Xj-*OR#|!&JX&4Xwt<8M?6Fw1qPB|IR$FV>d5J)ZzugDFc{Bg{=KJ4y zQ`5t*>ER!WCSfFsA;;!XNm+&2lP0Hwp@$~~K|oG{dbuFP z4>m!g$|xz!NGX|DqRlA;U{C@A05=FUy#~B&7|*gLYgDrfQ%3j(Wti;}%N81v$j4f} zyyz41AypC!os>4D7YwQaA1FhH72jucV2#5VJP9iW8~}J;5o@3KLDRU>ph)4$W0wJ_ zlSf+1xW{=g3~hKuZ>5NZaGM}O-e%xg;tc_tzunwpu^D;|7fhZvO_T~ys0E|bt)LllrP9S=$hy@G zV90dNYIfwVWXSnE+RmAK4Kg5kytXnT6^|K_%M|JuyiQ)4w2RXAiLs1~!f(7&tteNh zgoLPiY4Uj8GR3LnrP>N%&HeyTzCz*2R8gQ@p)HS0RTSu7h@iI2zgDhDUaF|kz8I+^ zn58;0d6`bekV-&p)CB>ZfFbzV`}u%bt|TgEsMY~y#gaL~*VoSxGOKh!%yYUBW{pme zyjCaEOahEd2|~1v2({$C4p6ONWZLafAXmi)m0oR(Yzj80GGe1nhIBDfvCo$g3uJXw zvgGAxUrau+SByLprYLw-B8InF$7e)L&}LnbMg$mn-J<58WLo=dR4OA+Cv|d0UPj8U zAYH5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755 --- a/src/makefile +++ b/src/makefile @@ -4,7 +4,7 @@ PLVM = plvm PLVMZP_APL = vmsrc/apple/plvmzp.inc PLVM01 = rel/apple/A1PLASMA\#060280 PLVM02 = rel/apple/PLASMA.SYSTEM\#FF2000 -PLVMJIT = rel/apple/PLVM-128\#FF2000 +PLVMJIT = rel/apple/PLVM.128\#FF2000 PLVM802 = rel/apple/PLVM16\#FF2000 PLVM03 = rel/apple/SOS.INTERP\#050000 SOSCMD = rel/apple/SOS.CMD\#FE1000 diff --git a/src/mkrel b/src/mkrel index 5f27208..1155e03 100755 --- a/src/mkrel +++ b/src/mkrel @@ -1,8 +1,8 @@ cp rel/apple/CMD#061000 prodos/CMD.BIN -cp rel/apple/CMDJIT#061000 prodos/CMDJIT.BIN +cp rel/apple/CMD128#061000 prodos/CMD128.BIN cp rel/apple/PLASMA.SYSTEM#FF2000 prodos/PLASMA.SYSTEM.SYS -cp rel/apple/PLASMAJIT.SYSTEM#FF2000 prodos/PLASMA.JIT.SYS -cp rel/apple/PLASMA16.SYSTEM#FF2000 prodos/PLASMA16.SYS +cp rel/apple/PLVM.128#FF2000 prodos/PLVM.128.SYS +cp rel/apple/PLVM16#FF2000 prodos/PLVM16.SYS cp ../doc/Editor.md prodos/EDITOR.README.TXT rm -rf prodos/sys diff --git a/src/vmsrc/apple/plvm02.s b/src/vmsrc/apple/plvm02.s index cf61fbb..2268572 100755 --- a/src/vmsrc/apple/plvm02.s +++ b/src/vmsrc/apple/plvm02.s @@ -1519,7 +1519,7 @@ READVM !BYTE 4 !WORD 0 CLOSEVM !BYTE 1 !BYTE 0 -VM128 !BYTE 8, 'P', 'L', 'V', 'M', '-', '1', '2', '8' +VM128 !BYTE 8, 'P', 'L', 'V', 'M', '.', '1', '2', '8' VM16 !BYTE 6, 'P', 'L', 'V', 'M', '1', '6' !CPU 6502 } From 0925945d2e115b37e33557fcbf19519994b2d7ec Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Fri, 13 Apr 2018 13:34:10 -0700 Subject: [PATCH 18/74] Fix VM filename in VMLOAD --- PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes src/vmsrc/apple/plvm02.s | 14 +++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/PLASMA-SYS2.PO b/PLASMA-SYS2.PO index daf6b25c4d9fee32a7aeffbe4e7c2aa999840eb5..ae8b2cb48cd52e3bfe87b093abf9969d153f02d6 100755 GIT binary patch delta 46 ycmZp8z|ru4W5XO4CVt+{^H>C}h3y4a3iLV%D98w`^y`Iinh)7;KV;8n_W=NCFc0Ve delta 46 ycmZp8z|ru4W5XO4CIOz!^H>C}h3y1Z3iR3wD98w`^y`Iinh)7;KV;8n_W=NBVM16 STA OPENVM+1 + LDA #>VM16 + STA OPENVM+2 JSR + LDA #VM128 STA OPENVM+1 + LDA #>VM128 + STA OPENVM+2 + JSR PRODOS ; OPEN CMD !BYTE $C8 !WORD OPENVM @@ -1508,11 +1508,11 @@ ALTVM = * BNE NOVM JMP $2000 ; JUMP TO ALT VM NOVM RTS -OPENVM !BYTE 3 +OPENVM !BYTE 3 !WORD VM128 !WORD $0800 REFVM !BYTE 0 -READVM !BYTE 4 +READVM !BYTE 4 !BYTE 0 !WORD $2000 !WORD $9F00 From 97e2c48098169db9db9636db9c771bf406027c1c Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Fri, 13 Apr 2018 16:13:12 -0700 Subject: [PATCH 19/74] Fix 64K VM --- PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes src/vmsrc/apple/cmd.pla | 18 +++++++++--------- src/vmsrc/apple/cmdjit.pla | 13 ++++++------- src/vmsrc/apple/cmdjitstub.s | 1 + src/vmsrc/apple/cmdstub.s | 3 +-- src/vmsrc/apple/plvm02.s | 17 ++--------------- src/vmsrc/apple/plvmjit02.s | 13 ------------- 7 files changed, 19 insertions(+), 46 deletions(-) diff --git a/PLASMA-SYS2.PO b/PLASMA-SYS2.PO index ae8b2cb48cd52e3bfe87b093abf9969d153f02d6..56f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5g6a><~T>u_x6 wE!$F5*zMq3OKKrkTN%1+T!xPDM=qQ-WVtHcyZ3miwDmC<4$}3_H=E(<-z&OaEC2ui diff --git a/src/vmsrc/apple/cmd.pla b/src/vmsrc/apple/cmd.pla index 78fb73b..5427928 100755 --- a/src/vmsrc/apple/cmd.pla +++ b/src/vmsrc/apple/cmd.pla @@ -43,8 +43,8 @@ word syspath word syscmdln word = @execmod, @open, @close, @read, @write byte perr -byte jitcount = $10 -byte jitsize = $FF +byte jitcount = 0 +byte jitsize = 0 // // Working input buffer overlayed with strings table // @@ -1369,8 +1369,8 @@ syscmdln = @cmdln // Try to load autorun. // autorun = open(@autorun) -if autorun > 0 - cmdln = read(autorun, @autorun, 128) +if autorun + ^getlnbuf = read(autorun, getlnbuf + 1, 128) close(0) else // @@ -1381,6 +1381,7 @@ fin perr = 0 while 1 if ^getlnbuf + strcpy(@cmdln, getlnbuf) when toupper(parsecmd(getlnbuf)) is 'Q' reboot() @@ -1406,27 +1407,26 @@ while 1 execsys(getlnbuf) break is '+' - saveX + //saveX execmod(striptrail(getlnbuf)) // // Clean up // - restoreX + //restoreX resetmemfiles break otherwise - cout('?') + cout(perr)//cout('?') wend if perr prstr("ERR:$") prbyte(perr) - perr = 0 else prstr("OK") fin crout() fin prstr(pfxop(@prefix, GET_PFX)) - strcpy(@cmdln, rdstr($BA)) + rdstr($BA) loop done diff --git a/src/vmsrc/apple/cmdjit.pla b/src/vmsrc/apple/cmdjit.pla index ee5f38b..f20c876 100755 --- a/src/vmsrc/apple/cmdjit.pla +++ b/src/vmsrc/apple/cmdjit.pla @@ -1027,7 +1027,7 @@ def adddef(isfirst, addr, deflast)#1 if not isfirst preventry = defentry - t_defentry defsize = addr - preventry=>bytecodeaddr - if defsize <= jitsize // and *jitcomp + if defsize <= jitsize preventry=>interpaddr = $03D6 // JSR $03D6 (JIT INTERP) preventry->callcount = jitcount // Set JIT countdown preventry->bytecodesize = defsize // Set size @@ -1036,8 +1036,7 @@ def adddef(isfirst, addr, deflast)#1 defentry->interpjsr = $20 defentry=>interpaddr = $03DC // JSR $03DC (BYTECODE INTERP) defentry=>bytecodeaddr = addr - //defentry=>5 = 0 // Clear count and size - defentry->t_defentry = 0 // NULL out next entry + defentry->t_defentry = 0 // NULL out next entry return defentry end def loadmod(mod)#1 @@ -1438,8 +1437,8 @@ xheaptop = $A000 // Top where JIT loaded // Try to load autorun. // autorun = open(@autorun) -if autorun > 0 - cmdln = read(autorun, @autorun, 128) +if autorun + ^getlnbuf = read(autorun, getlnbuf + 1, 128) close(0) else // @@ -1450,6 +1449,7 @@ fin perr = 0 while 1 if ^getlnbuf + strcpy(@cmdln, getlnbuf) when toupper(parsecmd(getlnbuf)) is 'Q' reboot() @@ -1489,13 +1489,12 @@ while 1 if perr prstr("ERR:$") prbyte(perr) - perr = 0 else prstr("OK") fin crout() fin prstr(pfxop(@prefix, GET_PFX)) - strcpy(@cmdln, rdstr($BA)) + rdstr($BA) loop done diff --git a/src/vmsrc/apple/cmdjitstub.s b/src/vmsrc/apple/cmdjitstub.s index 483d4bb..ba4e9af 100644 --- a/src/vmsrc/apple/cmdjitstub.s +++ b/src/vmsrc/apple/cmdjitstub.s @@ -34,6 +34,7 @@ JITCODE = $03E4 ; ; INIT VM ENVIRONMENT STACK POINTERS ; + STY $01FF STY PPL STY IFPL ; INIT FRAME POINTER = $AF00 (4K FOR JIT CODE) STY JITCODE diff --git a/src/vmsrc/apple/cmdstub.s b/src/vmsrc/apple/cmdstub.s index ff00909..54527d4 100644 --- a/src/vmsrc/apple/cmdstub.s +++ b/src/vmsrc/apple/cmdstub.s @@ -32,10 +32,9 @@ LCBNK1 = $08 ; ; INIT VM ENVIRONMENT STACK POINTERS ; - STY PPL + STY $01FF STY IFPL ; INIT FRAME POINTER = $BF00 LDA #$BF - STA PPH STA IFPH LDX #$FE ; INIT STACK POINTER (YES, $FE. SEE GETS) TXS diff --git a/src/vmsrc/apple/plvm02.s b/src/vmsrc/apple/plvm02.s index e5a0b2a..ca10863 100755 --- a/src/vmsrc/apple/plvm02.s +++ b/src/vmsrc/apple/plvm02.s @@ -29,8 +29,7 @@ LCRWEN = $C083 LCBNK2 = $00 LCBNK1 = $08 !SOURCE "vmsrc/plvmzp.inc" -PSR = TMP+2 -DVSIGN = PSR+1 +DVSIGN = TMP+3 DROP = $EF NEXTOP = $F0 FETCHOP = NEXTOP+1 @@ -245,19 +244,6 @@ CMDENTRY = * !WORD CLOSEPARMS BNE FAIL ; -; INIT VM ENVIRONMENT STACK POINTERS -; -; LDA #$00 - STA $01FF ; CLEAR CMDLINE BUFF - STA PPL ; INIT FRAME POINTER - STA IFPL - LDA #$BF ; FRAME POINTER AT $BF00, BELOW PRODOS - STA PPH - STA IFPH - LDX #$FE ; INIT STACK POINTER (YES, $FE. SEE GETS) - TXS - LDX #ESTKSZ/2 ; INIT EVAL STACK INDEX -; ; CHANGE CMD STRING TO SYSPATH STRING ; LDA STRBUF @@ -317,6 +303,7 @@ DEFCMD = * ;!FILL 28 ENDBYE = * } LCDEFCMD = * ;*-28 ; DEFCMD IN LC MEMORY + !ALIGN 255,0 ;* ;* ADD TOS TO TOS-1 ;* diff --git a/src/vmsrc/apple/plvmjit02.s b/src/vmsrc/apple/plvmjit02.s index b9f516b..136bc07 100755 --- a/src/vmsrc/apple/plvmjit02.s +++ b/src/vmsrc/apple/plvmjit02.s @@ -329,19 +329,6 @@ CMDENTRY = * !WORD CLOSEPARMS BNE FAIL ; -; INIT VM ENVIRONMENT STACK POINTERS -; -; LDA #$00 - STA $01FF ; CLEAR CMDLINE BUFF - STA PPL ; INIT FRAME POINTER - STA IFPL - LDA #$AF ; FRAME POINTER AT $AF00, BELOW JIT BUFFER - STA PPH - STA IFPH - LDX #$FE ; INIT STACK POINTER (YES, $FE. SEE GETS) - TXS - LDX #ESTKSZ/2 ; INIT EVAL STACK INDEX -; ; CHANGE CMD STRING TO SYSPATH STRING ; LDA STRBUF From c88d5cabcbde2fb44f828af2ab4464fe122efa07 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Fri, 13 Apr 2018 16:14:40 -0700 Subject: [PATCH 20/74] update images --- PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/PLASMA-SYS2.PO b/PLASMA-SYS2.PO index 56f67185f0598600e648e78e51557e5ca2eda949..81f262f5ceca654dbb0427b57a2a70315ca5db92 100755 GIT binary patch delta 705 zcmaJ-T}V@582-NFmg3JkJ2E%iv}2x0%pW#&q=8OLN5qVi`=SCbLN6RtM3AUNv=S`} zA^ec;G7N+4Mmk93h10Aqf+ElNou5&dB$%zB5lPU+*4d(>n|R@Up7-H>A0FQ5dR}xr zZ?4V6CM}>t;MhvA0oZY&fW@N8zSqryalumfM`S>)7-|o9wbzADgi&V~0BI-41@-x0 z>ITT(8vDlWZIhcZ;F&38fK+V$z5}z2U8*QdLHHQ+mTCq7smn64(;9Msh@Gtgj3j0>>RBX*I^}0lVmJlb}aCwp6CA#sluiOW!}vWXRn)(OIMrZ*6c;rPT`HpguN=Cqne|rsfI8@5+C#qpzxt3Qe ztGTozTA$|A4rrCSP50>Mv?YC0FNoL2193M!Pe*8s5_(KIqnuT*s8+R1ZB`Gd)9Spc zs-O0&-w2Rdxk0A#nw(Ec$WytB_(=x|lU_1Lc=@1yTp!ct^watseM9@KZP66Hu1qU- zrBPW?HkCFU^v57FUiAY`GzD)#feGN&;8knC{Nn!Q(S&U^SvSALn)!ab*3=>l$ic+i z$50aR1MT^F@{AWx delta 742 zcmaJ-Ur1AN6h8O5sUw?rcWv{(Gv|`o))ciAOii7H8{PCrP!y5AEa)K#N}+N}RuG2l zHhQXorKS}a7bAMe6=l&s+Wl`*S%%trNHP@)yv+#(J;ZtV&i8S??{JQ9D$zHUI8vn| zmbFl8A&Fd=2BOE3prt95Y3n8edMw(cKOzox%3a;$sdhB&Z9;V(03{vbVL=1I3lQ^0 z=cC@MsysXjPgL$GFnaZJJeEjfxRJ?8TEVaoZPpgxgu-~V{$xGWx>LYwBCICD=0m3p zZAOBg&&+d7f>*)Z4`8!`p_O#>NZ)uE(3pAhhx!{1|0aV1{5SwD`}l3Y){cfLzJy;`$VGiCMLV+ z1LiMI!UFXA;*ZG2E+3MwOSh#VevEGrS_GM2JeW(_{@K8r t{<%P?KjM_u6j!7-&YaJjE}M+Qa+rM;1GxW2WnY!IZvgKa9vH^X{svj)H4^{; From ed280b3584012459c826e999f1544def89c949fc Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Fri, 13 Apr 2018 21:47:12 -0700 Subject: [PATCH 21/74] Update README.md --- README.md | 76 +------------------------------------------------------ 1 file changed, 1 insertion(+), 75 deletions(-) diff --git a/README.md b/README.md index 7d2f5fa..a4e4db4 100755 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ Different projects have led to the architecture of PLASMA, most notably Apple Pa - [Call Stack](#call-stack) - [Local Frame Stack](#local-frame-stack) - [Local String Pool](#local-string-pool) - - [The Bytecodes](#the-bytecodes) + - [The Bytecodes](https://github.com/dschmenk/PLASMA/wiki/PLASMA-Byte-Codes) - [Apple 1 PLASMA](#apple-1-plasma) - [Apple II PLASMA](#apple-ii-plasma) - [Apple /// PLASMA](#apple--plasma) @@ -1313,80 +1313,6 @@ One of the biggest problems to overcome with the 6502 is its very small hardware Any function that uses in-line strings may have those strings copied to the local string pool for usage. This allows string literals to exist in the same memory as the bytecode and only copied to main memory when used. The string pool is deallocated along with the local frame stack when the function exits. -### The Opcodes - -The compact code representation comes through the use of opcodes closely matched to the PLASMA compiler. They are: - -| OPCODE | Name | Description -|:------:|:------:|----------------------------------- -| $00 | ZERO | push zero on the stack -| $02 | ADD | add top two values, leave result on top -| $04 | SUB | subtract next from top from top, leave result on top -| $06 | MUL | multiply two topmost stack values, leave result on top -| $08 | DIV | divide next from top by top, leave result on top -| $0A | MOD | divide next from top by top, leave remainder on top -| $0C | INCR | increment top of stack -| $0E | DECR | decrement top of stack -| $10 | NEG | negate top of stack -| $12 | COMP | compliment top of stack -| $14 | AND | bit wise AND top two values, leave result on top -| $16 | IOR | bit wise inclusive OR top two values, leave result on top -| $18 | XOR | bit wise exclusive OR top two values, leave result on top -| $1A | SHL | shift left next from top by top, leave result on top -| $1C | SHR | shift right next from top by top, leave result on top -| $02 | IDXB | add top of stack to next from top, leave result on top (ADD) -| $1E | IDXW | add 2X top of stack to next from top, leave result on top -| $20 | NOT | logical NOT of top of stack -| $22 | LOR | logical OR top two values, leave result on top -| $24 | LAND | logical AND top two values, leave result on top -| $26 | LA | load address -| $28 | LLA | load local address from frame offset -| $2A | CB | constant byte -| $2C | CW | constant word -| $2E | CS | constant string -| $30 | DROP | drop top stack value -| $32 | DUP | duplicate top stack value -| $34 | NOP | -| $36 | DIVMOD | divide next from to by top, leave result and remainder on stack -| $38 | BRGT | branch next from top greater than top -| $3A | BRLT | branch next from top less than top -| $3C | BREQ | branch next from top equal to top -| $3E | BRNE | branch next from top not equal to top -| $40 | ISEQ | if next from top is equal to top, set top true -| $42 | ISNE | if next from top is not equal to top, set top true -| $44 | ISGT | if next from top is greater than top, set top true -| $46 | ISLT | if next from top is less than top, set top true -| $48 | ISGE | if next from top is greater than or equal to top, set top true -| $4A | ISLE | if next from top is less than or equal to top, set top true -| $4C | BRFLS | branch if top of stack is zero -| $4E | BRTRU | branch if top of stack is non-zero -| $50 | BRNCH | branch to address -| $52 | IBRNCH | branch to address on stack top -| $54 | CALL | sub routine call with stack parameters -| $56 | ICAL | sub routine call to address on stack top with stack parameters -| $58 | ENTER | allocate frame size and copy stack parameters to local frame -| $5A | LEAVE | deallocate frame and return from sub routine call -| $5C | RET | return from sub routine call -| $5E | CFFB | constant with $FF MSB -| $60 | LB | load byte from top of stack address -| $62 | LW | load word from top of stack address -| $64 | LLB | load byte from frame offset -| $66 | LLW | load word from frame offset -| $68 | LAB | load byte from absolute address -| $6A | LAW | load word from absolute address -| $6C | DLB | duplicate top of stack into local byte at frame offset -| $6E | DLW | duplicate top of stack into local word at frame offset -| $70 | SB | store next from top of stack byte into top address -| $72 | SW | store next from top of stack word into top address -| $74 | SLB | store top of stack into local byte at frame offset -| $76 | SLW | store top of stack into local word at frame offset -| $78 | SAB | store top of stack into byte at absolute address -| $7A | SAW | store top of stack into word at absolute address -| $7C | DAB | duplicate top of stack into byte at absolute address -| $7E | DAW | duplicate top of stack into word at absolute address - -The opcodes were developed over time by starting with a very basic set of operations and slowly adding opcodes when the PLASMA compiler could improve code density or performance. - ## Apple 1 PLASMA Obviously the Apple 1 is a little more constrained than most machines PLASMA is targeting. But, with the required addition of the CFFA1 (http://dreher.net/?s=projects/CFforApple1&c=projects/CFforApple1/main.php), the Apple 1 gets 32K of RAM and a mass storage device. Enough to run PLASMA and load/execute modules. From 45b3560040daa2bb5b7b549d979e58688644db90 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 14 Apr 2018 12:48:12 -0700 Subject: [PATCH 22/74] Fix compiler allocations for 64K machine --- src/toolsrc/codegen.pla | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/toolsrc/codegen.pla b/src/toolsrc/codegen.pla index 24498fa..d098aa0 100644 --- a/src/toolsrc/codegen.pla +++ b/src/toolsrc/codegen.pla @@ -180,7 +180,7 @@ def emit_select(tag)#0 end def emit_caseblock(cnt, oflist, taglist)#0 byte i - + if not cnt or cnt > 256; exit_err(ERR_OVER|ERR_STATE); fin emit_pending_seq emit_byte(cnt) @@ -534,7 +534,7 @@ def init_idglobal#0 fixup_num = FIXUPNUM globalbufsz = IDGLOBALSZ localbufsz = IDLOCALSZ - if isult(heapavail, $4000) + if isult(heapavail, $6000) dfd_num = DFDNUM/2 tag_num = TAGNUM/2 fixup_num = FIXUPNUM/2 From 174ff0b7a22f4bb25fee1e10e7e65c89e77bb27e Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 14 Apr 2018 13:32:38 -0700 Subject: [PATCH 23/74] update image` --- PLASMA-BLD2.PO | Bin 143360 -> 143360 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/PLASMA-BLD2.PO b/PLASMA-BLD2.PO index acf572f4832760742ace2a78108b1760810ce325..6770ea811f1f1c9345376982245042ab1b1f95e3 100644 GIT binary patch delta 39 tcmZp8z|ru4W5Wkl-aZw1US)>I3=AN~=D)0lHy9I|_3v%hzsGnn5C9=m4%+|# delta 39 tcmZp8z|ru4W5Wkl-X0YWL1l)=3=AN~=D)0lHy9n7_3v%hzsGnn5C9xg4v_!= From bbac311c4f63451f37036c85b34ce3ab94816a89 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sun, 15 Apr 2018 14:34:45 -0700 Subject: [PATCH 24/74] John Brooks Optiizations --- PLASMA-SOS2.PO | Bin 143360 -> 143360 bytes PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes src/vmsrc/apple/plvm01.s | 12 ++++++++++++ src/vmsrc/apple/plvm02.s | 6 +++--- src/vmsrc/apple/plvm03.s | 10 +++++----- src/vmsrc/apple/plvm802.s | 36 ++++++++++++++++++------------------ src/vmsrc/apple/plvmjit02.s | 6 +++--- 7 files changed, 41 insertions(+), 29 deletions(-) diff --git a/PLASMA-SOS2.PO b/PLASMA-SOS2.PO index 4c4abb4254f970d5a0a841863f2a9e37f1e71412..551cd1085ea1cfacdf632b0b860cc6b8d7caf9cd 100644 GIT binary patch delta 1813 zcmY*ZZ)j6j6hH6fHKwg;(-_y-6@@BAtEi0fOtW#7Eyxzr^qPecN>`pS zb!%4&8zb!sZ}`DE>HHvgZ_>V`b25+(wtbLIh6w5xKe!GyH&JU>6!xLnc}bn~k-U5E zxxaJn@1FC!Z~U%p{I1RDl^o|9;Zt8nofm$Cvat}Bu2c&%y1gzYJXjd2dr;f9Y*^l1 zhTs3jmwNDP5CNZSmu}2GnX8}Qp`UDC8dKQP#cnprd)aAzfZ2^c)@6iQzj2ri8xeNX zc$+;n;%uk!4m)q8ST;Y&-YcACjfE+;yKsSJ3Po03xWazsKd@Dr)V?G$MAf}nv zjiV-3fbx<^>gR)T=oyO$rdJfuOCd`kYKB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uXq`M!~M8Z>(GwHZ^mE7CsC_>MdswN z>{2|+oQhSa%BWs-TwPIrsCrydkKL$NIxe+H9_hK1iHzu%l#fbL1*$_0=nS$*Nt~@6 z(b~0Atwno-qj*Km4L^aDQBrhjgJM;x)D9K#Im4EndinHUUfyc+#7lQPM7&t#UU^2A zd-*9JRK6&A>N%xHv8Y`sAD$DiEC4{`5_CfHiySQ4iYK>XOET$%%nffz zv7UojQSo=0+k$Hb4!#GDTTyY7oDX?>;52XaeW&0wLvhVybCxTF^&BL1IM}$P>n^0{ tZ8pbbx&x;p4ZC;IVM0dCA)=l%a_Vf37(Xy_UB|;QNI79}3I<`a{||}y(#-$> diff --git a/src/vmsrc/apple/plvm01.s b/src/vmsrc/apple/plvm01.s index e9e14d3..8f073ca 100644 --- a/src/vmsrc/apple/plvm01.s +++ b/src/vmsrc/apple/plvm01.s @@ -121,6 +121,7 @@ OPTBL !WORD CN,CN,CN,CN,CN,CN,CN,CN ; 00 02 !WORD NEG,COMP,BAND,IOR,XOR,SHL,SHR,IDXW ; 90 92 94 96 98 9A 9C 9E !WORD BRGT,BRLT,INCBRLE,ADDBRLE,DECBRGE,SUBBRGE,BRAND,BROR ; A0 A2 A4 A6 A8 AA AC AE !WORD ADDLB,ADDLW,ADDAB,ADDAW,IDXLB,IDXLW,IDXAB,IDXAW ; B0 B2 B4 B6 B8 BA BC BE + !WORD NATV ; C0 ;* ;* DIV TOS-1 BY TOS ;* @@ -1066,6 +1067,17 @@ LEAVE INY ;+INC_IP RTS + INC IFPH RET RTS +;* +;* RETURN TO NATIVE CODE +;* +NATV TYA ; FLATTEN IP + SEC + ADC IPL + STA IPL + BCS + + JMP (IP) ++ INC IPH + JMP (IP) A1CMD !SOURCE "vmsrc/apple/a1cmd.a" SEGEND = * VMINIT LDY #$10 ; INSTALL PAGE 0 FETCHOP ROUTINE diff --git a/src/vmsrc/apple/plvm02.s b/src/vmsrc/apple/plvm02.s index ca10863..e9697ff 100755 --- a/src/vmsrc/apple/plvm02.s +++ b/src/vmsrc/apple/plvm02.s @@ -1452,9 +1452,9 @@ NATV TYA ; FLATTEN IP SEC ADC IPL STA IPL - LDA #$00 - ADC IPH - STA IPH + BCS + + JMP (IP) ++ INC IPH JMP (IP) VMEND = * } diff --git a/src/vmsrc/apple/plvm03.s b/src/vmsrc/apple/plvm03.s index 920c57b..70df616 100755 --- a/src/vmsrc/apple/plvm03.s +++ b/src/vmsrc/apple/plvm03.s @@ -1428,11 +1428,11 @@ RET RTS NATV TYA ; FLATTEN IP SEC ADC IPL - STA TMPL - LDA #$00 - ADC IPH - STA TMPH - JMP JMPTMP + STA IPL + BCS + + JMP (IP) ++ INC IPH + JMP (IP) SOSCMD = * !SOURCE "vmsrc/apple/sossys.a" diff --git a/src/vmsrc/apple/plvm802.s b/src/vmsrc/apple/plvm802.s index b05c283..c8fb981 100644 --- a/src/vmsrc/apple/plvm802.s +++ b/src/vmsrc/apple/plvm802.s @@ -728,31 +728,31 @@ DIVMOD +ACCMEM8 ;* ;* NEGATE TOS ;* -NEG LDA #$0000 - SEC - SBC TOS,S - STA TOS,S +NEG PLA + EOR #$FFFF + INC + PHA JMP NEXTOP ;* ;* INCREMENT TOS ;* -INCR LDA TOS,S +INCR PLA INC - STA TOS,S + PHA JMP NEXTOP ;* ;* DECREMENT TOS ;* -DECR LDA TOS,S +DECR PLA DEC - STA TOS,S + PHA JMP NEXTOP ;* ;* BITWISE COMPLIMENT TOS ;* -COMP LDA TOS,S +COMP PLA EOR #$FFFF - STA TOS,S + PHA JMP NEXTOP ;* ;* BITWISE AND TOS TO TOS-1 @@ -781,11 +781,11 @@ XOR PLA SHL PLA TAX BEQ + - LDA TOS,S + PLA - ASL DEX BNE - - STA TOS,S + PHA + JMP NEXTOP ;* ;* SHIFT TOS-1 RIGHT BY TOS @@ -793,12 +793,12 @@ SHL PLA SHR PLA TAX BEQ + - LDA TOS,S + PLA - CMP #$8000 ROR DEX BNE - - STA TOS,S + PHA + JMP NEXTOP ;* ;* DUPLICATE TOS @@ -1558,9 +1558,9 @@ BRLT LDA TOS,S PLA ; DROP FOR VALUES PLA BRA BRNCH ; BMI BRNCH -DECBRGE LDA TOS,S +DECBRGE PLA DEC - STA TOS,S + PHA _BRGE LDA TOS,S SEC SBC NOS,S @@ -1569,9 +1569,9 @@ _BRGE LDA TOS,S PLA ; DROP FOR VALUES PLA BRA NOBRNCH ; BMI NOBRNCH -INCBRLE LDA TOS,S +INCBRLE PLA INC - STA TOS,S + PHA _BRLE LDA NOS,S SEC SBC TOS,S diff --git a/src/vmsrc/apple/plvmjit02.s b/src/vmsrc/apple/plvmjit02.s index 136bc07..58c0413 100755 --- a/src/vmsrc/apple/plvmjit02.s +++ b/src/vmsrc/apple/plvmjit02.s @@ -2016,9 +2016,9 @@ NATV TYA ; FLATTEN IP SEC ADC IPL STA IPL - LDA #$00 - ADC IPH - STA IPH + BCS + + JMP (IP) ++ INC IPH JMP (IP) VMEND = * } From 8d119d3d8cd6bf7b0bc6fdb0c941847b26746588 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sun, 15 Apr 2018 14:47:14 -0700 Subject: [PATCH 25/74] Check for H/W/ access on BYTE loads --- PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes src/libsrc/apple/jit16.pla | 6 +++ src/libsrc/jit16core.pla | 90 ++++++++++++++++++++++++++----------- 3 files changed, 70 insertions(+), 26 deletions(-) diff --git a/PLASMA-SYS2.PO b/PLASMA-SYS2.PO index c3295a7eccf6a1c3deeacac52c47b436a4d4574c..58a0af1234a471951473d8c44892df9a04c6b330 100755 GIT binary patch delta 1329 zcmYjPe@xVM7=GRl2Oe~t2L~LAARrio__s+D^;K&%^DsO#B$hnl|aqk`7uVIv)U|4BifaXx`sJ zaiZt}=PSF8!hHL9aKPH@{JBDf6PW(XtSKhv)xAJ^b1oby-9oI5W|=INX;iZ zX_e3|vxH)kQpn2jJ+zE+*(ew zOB2}w;2E(^B{NS@npI^6jd2b5jKqJ1DH;0nW??a_WYP31W!WtHf8<(n!LVS#yL`(| zxx)DfTl*=CbGxZX**LL_exAF!sW-YZ0?orXNAjjx6p0=wU-j{*X%oE$QBnp{=6`1 zV9iB@)dZFGMQE%$u(+WPur?ynsuq#f{fc<&7YeO)enEW0Km-~LS~T2?hBZHVjxG)P(U>qq1GdZX+d9D#w{9P0VRI*F z;I}iR*a%9f))u~ecSF}fQIy7;I_QY_EQEjVRc!v*K?!0{h?hEwmvz#EBIPdF-AS>+ zb03d(D$#H!JtZU`$X4tpSSX9ac(;XCi?Lw8t~QI(e>vEzxP*#1)=EoB&w6i(c^UMgzz4Fqt)G?%7yS=I66X(4dHo;b%Mt8ILVzO~b&i$j zajXKIsW|LdgDht{?9O#CIoIPGryjpMGoW>4BGZ+H3fJQ}@7j!aTueAHrkqDjauLpqDO-KXGjH()$RzlU7;eY`4Pzy7L zHq4l@cBT`K87uyt=|uxyMG&exMRRmMAIN) and ints disabled end +// +// Identify hardware addresses for certain byte sized access operations +// +def is_hwaddr(addr) + return addr >= $C000 and addr < $C100 +end include "libsrc/jit16core.pla" // // Install JIT compiler diff --git a/src/libsrc/jit16core.pla b/src/libsrc/jit16core.pla index 39de7be..4b87a8e 100644 --- a/src/libsrc/jit16core.pla +++ b/src/libsrc/jit16core.pla @@ -671,13 +671,24 @@ def compiler(defptr)#0 if A_IS_TOS ^codeptr = $48; codeptr++ // PHA fin - codeptr=>0 = $20E2 // SEP #$20 -> 8 BIT ACCUM/MEM - codeptr->2 = $AD // LDA abs - codeptr=>3 = dest - codeptr=>5 = $20C2 // REP #$20 -> 16 BIT ACCUM/MEM - codeptr->7 = $29 // AND #$00FF - codeptr=>8 = $00FF - codeptr = codeptr + 10 + if is_hwaddr(dest) + // + // Ensure we only do byte sized accesses to H/W + // + codeptr=>0 = $20E2 // SEP #$20 -> 8 BIT ACCUM/MEM + codeptr->2 = $AD // LDA abs + codeptr=>3 = dest + codeptr=>5 = $20C2 // REP #$20 -> 16 BIT ACCUM/MEM + codeptr->7 = $29 // AND #$00FF + codeptr=>8 = $00FF + codeptr = codeptr + 10 + else + codeptr->0 = $AD // LDA abs + codeptr=>1 = dest + codeptr->3 = $29 // AND #$00FF + codeptr=>4 = $00FF + codeptr = codeptr + 6 + fin A_IS_TOS = TRUE // PHA break is $6A // LAW @@ -1163,16 +1174,30 @@ def compiler(defptr)#0 if not A_IS_TOS ^codeptr = $68; codeptr++ // PLA fin - codeptr=>0 = $E785 // STA TMP - codeptr=>2 = $20E2 // SEP #$20 -> 8 BIT ACCUM/MEM - codeptr->4 = $AD // LDA abs - codeptr=>5 = dest - codeptr=>7 = $20C2 // REP #$20 -> 16 BIT ACCUM/MEM - codeptr->9 = $29 // AND #$00FF - codeptr=>10 = $00FF - codeptr->12 = $18 // CLC - codeptr=>13 = $E765 // ADC TMP - codeptr = codeptr + 15 + if is_hwaddr(dest) + // + // Ensure only byte sized accesses to H/W addresses + // + codeptr=>0 = $E785 // STA TMP + codeptr=>2 = $20E2 // SEP #$20 -> 8 BIT ACCUM/MEM + codeptr->4 = $AD // LDA abs + codeptr=>5 = dest + codeptr=>7 = $20C2 // REP #$20 -> 16 BIT ACCUM/MEM + codeptr->9 = $29 // AND #$00FF + codeptr=>10 = $00FF + codeptr->12 = $18 // CLC + codeptr=>13 = $E765 // ADC TMP + codeptr = codeptr + 15 + else + codeptr=>0 = $E785 // STA TMP + codeptr->2 = $AD // LDA abs + codeptr=>3 = dest + codeptr->5 = $29 // AND #$00FF + codeptr=>6 = $00FF + codeptr->8 = $18 // CLC + codeptr=>9 = $E765 // ADC TMP + codeptr = codeptr + 15 + fin A_IS_TOS = TRUE // PHA break is $B6 // ADDAW @@ -1233,15 +1258,28 @@ def compiler(defptr)#0 if not A_IS_TOS ^codeptr = $68; codeptr++ // PLA fin - codeptr=>0 = $E785 // STA TMP - codeptr=>2 = $20E2 // SEP #$20 -> 8 BIT ACCUM/MEM - codeptr->4 = $AD // LDA abs - codeptr=>5 = dest - codeptr=>7 = $20C2 // REP #$20 -> 16 BIT ACCUM/MEM - codeptr->9 = $29 // AND #$00FF - codeptr=>10 = $00FF - codeptr->12 = $0A // ASL - codeptr=>13 = $E765 // ADC TMP + if is_hwaddr(dest) + // + // Ensure only byte sized accesses to H/W addresses + // + codeptr=>0 = $E785 // STA TMP + codeptr=>2 = $20E2 // SEP #$20 -> 8 BIT ACCUM/MEM + codeptr->4 = $AD // LDA abs + codeptr=>5 = dest + codeptr=>7 = $20C2 // REP #$20 -> 16 BIT ACCUM/MEM + codeptr->9 = $29 // AND #$00FF + codeptr=>10 = $00FF + codeptr->12 = $0A // ASL + codeptr=>13 = $E765 // ADC TMP + else + codeptr=>0 = $E785 // STA TMP + codeptr->4 = $AD // LDA abs + codeptr=>5 = dest + codeptr->9 = $29 // AND #$00FF + codeptr=>10 = $00FF + codeptr->12 = $0A // ASL + codeptr=>13 = $E765 // ADC TMP + fin codeptr = codeptr + 15 A_IS_TOS = TRUE // PHA break From f32349b849d4a61bcd5fe938976d37211cad60f9 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sun, 15 Apr 2018 15:25:00 -0700 Subject: [PATCH 26/74] Buggered that optimization up --- src/libsrc/jit16core.pla | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/libsrc/jit16core.pla b/src/libsrc/jit16core.pla index 4b87a8e..d4417d5 100644 --- a/src/libsrc/jit16core.pla +++ b/src/libsrc/jit16core.pla @@ -689,7 +689,7 @@ def compiler(defptr)#0 codeptr=>4 = $00FF codeptr = codeptr + 6 fin - A_IS_TOS = TRUE // PHA + A_IS_TOS = TRUE // PHA break is $6A // LAW dest = *(bytecode+i+1) @@ -1196,9 +1196,9 @@ def compiler(defptr)#0 codeptr=>6 = $00FF codeptr->8 = $18 // CLC codeptr=>9 = $E765 // ADC TMP - codeptr = codeptr + 15 + codeptr = codeptr + 11 fin - A_IS_TOS = TRUE // PHA + A_IS_TOS = TRUE // PHA break is $B6 // ADDAW dest = *(bytecode+i+1) @@ -1271,16 +1271,17 @@ def compiler(defptr)#0 codeptr=>10 = $00FF codeptr->12 = $0A // ASL codeptr=>13 = $E765 // ADC TMP + codeptr = codeptr + 15 else - codeptr=>0 = $E785 // STA TMP - codeptr->4 = $AD // LDA abs - codeptr=>5 = dest - codeptr->9 = $29 // AND #$00FF - codeptr=>10 = $00FF - codeptr->12 = $0A // ASL - codeptr=>13 = $E765 // ADC TMP + codeptr=>0 = $E785 // STA TMP + codeptr->2 = $AD // LDA abs + codeptr=>3 = dest + codeptr->5 = $29 // AND #$00FF + codeptr=>6 = $00FF + codeptr->8 = $0A // ASL + codeptr=>9 = $E765 // ADC TMP + codeptr = codeptr + 11 fin - codeptr = codeptr + 15 A_IS_TOS = TRUE // PHA break is $BE // IDXAW From bef66ae6c0470f07e0af0826d64d27ae10b48594 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sun, 15 Apr 2018 15:28:20 -0700 Subject: [PATCH 27/74] Fix buggered 65802 JIT optimization --- PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/PLASMA-SYS2.PO b/PLASMA-SYS2.PO index 58a0af1234a471951473d8c44892df9a04c6b330..510c712054737d9744fd54371532b8573945b6a7 100755 GIT binary patch delta 1080 zcmYLGe@xV67=J!*hWzS0ex5=S$YCVsNv3&210yMi=J3Zd$O$D-Q%8(}C1U|yr0kWyzlcq&+~a2 zMnfA$LmerRSlZI~cD++Aig7}9RfV#WXcdJlrzUOUvQ)ZH3*_1d75FS8;-E&95k;$) zP};SK%YZ;+3&g{g_fICZsKuR2Z774C%iHjA$kNzS)t>Kpq77Q{M-1=oMJ(rB!BcE# zN0BIr;bt>d@<2P{gf516nvuzYcBJ7~PBJ17O9pAo6}jT1Vs4pz=r z;5gTIU@dmAr2{&V6vf6)B(SFgS-8#Z3eW3AA@(V}M%-KWsE0LOvV6sYlfpe+(916F zbipgqReZ~eTvnNI97lNA1P!;FWF6Uq3F!#(4l}ZNy&214QTR3-;`3(IiGLy<4U^G> zI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700 Subject: [PATCH 28/74] Update C64 VM --- src/vmsrc/apple/plvm02.s | 4 - src/vmsrc/c64/cmd.pla | 20 ++- src/vmsrc/c64/plvmc64.s | 311 +++++++++++++++++++++++++++------------ 3 files changed, 231 insertions(+), 104 deletions(-) diff --git a/src/vmsrc/apple/plvm02.s b/src/vmsrc/apple/plvm02.s index e9697ff..a24cabf 100755 --- a/src/vmsrc/apple/plvm02.s +++ b/src/vmsrc/apple/plvm02.s @@ -1379,8 +1379,6 @@ CALL INY ;+INC_IP STA IPH PLA STA IPL - LDA #>OPTBL ; MAKE SURE WE'RE INDEXING THE RIGHT TABLE - STA OPPAGE LDY #$00 JMP FETCHOP ;* @@ -1403,8 +1401,6 @@ ICAL LDA ESTKL,X STA IPH PLA STA IPL - LDA #>OPTBL ; MAKE SURE WE'RE INDEXING THE RIGHT TABLE - STA OPPAGE LDY #$00 JMP FETCHOP ;* diff --git a/src/vmsrc/c64/cmd.pla b/src/vmsrc/c64/cmd.pla index e201988..df22d0f 100755 --- a/src/vmsrc/c64/cmd.pla +++ b/src/vmsrc/c64/cmd.pla @@ -30,14 +30,13 @@ predef sext(a)#1, divmod(a,b)#2, execmod(modfile)#1 // // Exported CMDSYS table // -word version = $0110 // 01.10 +word version = $0200 // 02.00 word syspath word syscmdln -word = @execmod -word systemflags = 0 -word heap -word symtbl, lastsym -byte perr, refauto +word = @execmod, 0, 0, 0, 0 +byte perr +byte jitcount = 0 +byte jitsize = 0 // // String pool. // @@ -115,6 +114,13 @@ word = @machidstr, @machid word = 0 word syslibsym = @exports // +// System variable. +// +word systemflags = 0 +word heap +word symtbl, lastsym +byte refauto +// // Utility functions // asm saveX#0 @@ -1072,7 +1078,7 @@ heap = *freemem // // Print PLASMA version // -prstr("\nPRELIM PLASMA "); prbyte(version.1); cout('.'); prbyte(version.0); crout +prstr("\nPLASMA 2.0 Dev\n") //; prbyte(version.1); cout('.'); prbyte(version.0); crout // // Init symbol table. // diff --git a/src/vmsrc/c64/plvmc64.s b/src/vmsrc/c64/plvmc64.s index 0c8d6e1..a26ba10 100644 --- a/src/vmsrc/c64/plvmc64.s +++ b/src/vmsrc/c64/plvmc64.s @@ -121,6 +121,7 @@ OPTBL !WORD CN,CN,CN,CN,CN,CN,CN,CN ; 00 02 !WORD NEG,COMP,BAND,IOR,XOR,SHL,SHR,IDXW ; 90 92 94 96 98 9A 9C 9E !WORD BRGT,BRLT,INCBRLE,ADDBRLE,DECBRGE,SUBBRGE,BRAND,BROR ; A0 A2 A4 A6 A8 AA AC AE !WORD ADDLB,ADDLW,ADDAB,ADDAW,IDXLB,IDXLW,IDXAB,IDXAW ; B0 B2 B4 B6 B8 BA BC BE + !WORD NATV ; C0 ;* ;* DIV TOS-1 BY TOS ;* @@ -143,7 +144,7 @@ MOD JSR _DIV ;* DIVMOD TOS-1 BY TOS ;* DIVMOD JSR _DIV - LSR DVSIGN ; SIGN(RESULT) = (SIGN(DIVIDEND) + SIGN(DIVISOR)) & 1 + LSR DVSIGN ; SIGN(RESULT) = (SIGN(DIVIDEND) + SIGN(DIVISOR)) & 1 BCC + JSR _NEG + DEX @@ -527,45 +528,72 @@ LLW INY ;+INC_IP ;* ;* ADD VALUE FROM LOCAL FRAME OFFSET ;* -ADDLB LDA #$60 ; RTS - STA NEXTOP - JSR LLB - LDA #$C8 ; INY - STA NEXTOP - JMP ADD -ADDLBX LDA #$60 ; RTS - STA NEXTOP - JSR LLBX - LDA #$C8 ; INY - STA NEXTOP - JMP ADD -ADDLW LDA #$60 ; RTS - STA NEXTOP - JSR LLW - LDA #$C8 ; INY - STA NEXTOP - JMP ADD -ADDLWX LDA #$60 ; RTS - STA NEXTOP - JSR LLWX - LDA #$C8 ; INY - STA NEXTOP - JMP ADD +ADDLB INY ;+INC_IP + LDA (IP),Y + STY IPY + TAY + LDA (IFP),Y + CLC + ADC ESTKL,X + STA ESTKL,X + BCC + + INC ESTKH,X ++ LDY IPY + JMP NEXTOP +ADDLW INY ;+INC_IP + LDA (IP),Y + STY IPY + TAY + LDA (IFP),Y + CLC + ADC ESTKL,X + STA ESTKL,X + INY + LDA (IFP),Y + ADC ESTKH,X + STA ESTKH,X + LDY IPY + JMP NEXTOP ;* ;* INDEX VALUE FROM LOCAL FRAME OFFSET ;* -IDXLB LDA #$60 ; RTS - STA NEXTOP - JSR LLB - LDA #$C8 ; INY - STA NEXTOP - JMP IDXW -IDXLW LDA #$60 ; RTS - STA NEXTOP - JSR LLW - LDA #$C8 ; INY - STA NEXTOP - JMP IDXW +IDXLB INY ;+INC_IP + LDA (IP),Y + STY IPY + TAY + LDA (IFP),Y + LDY #$00 + ASL + BCC + + INY + CLC ++ ADC ESTKL,X + STA ESTKL,X + TYA + ADC ESTKH,X + STA ESTKH,X + LDY IPY + JMP NEXTOP +IDXLW INY ;+INC_IP + LDA (IP),Y + STY IPY + TAY + LDA (IFP),Y + ASL + STA TMPL + INY + LDA (IFP),Y + ROL + STA TMPH + LDA TMPL + CLC + ADC ESTKL,X + STA ESTKL,X + LDA TMPH + ADC ESTKH,X + STA ESTKH,X + LDY IPY + JMP NEXTOP ;* ;* LOAD VALUE FROM ABSOLUTE ADDRESS ;* @@ -600,33 +628,84 @@ LAW INY ;+INC_IP ;* ;* ADD VALUE FROM ABSOLUTE ADDRESS ;* -ADDAB LDA #$60 ; RTS - STA NEXTOP - JSR LAB - LDA #$C8 ; INY - STA NEXTOP - JMP ADD -ADDAW LDA #$60 ; RTS - STA NEXTOP - JSR LAW - LDA #$C8 ; INY - STA NEXTOP - JMP ADD +ADDAB INY ;+INC_IP + LDA (IP),Y + STA ESTKH-2,X + INY ;+INC_IP + LDA (IP),Y + STA ESTKH-1,X + LDA (ESTKH-2,X) + CLC + ADC ESTKL,X + STA ESTKL,X + BCC + + INC ESTKH,X ++ JMP NEXTOP +ADDAW INY ;+INC_IP + LDA (IP),Y + STA SRCL + INY ;+INC_IP + LDA (IP),Y + STA SRCH + STY IPY + LDY #$00 + LDA (SRC),Y + CLC + ADC ESTKL,X + STA ESTKL,X + INY + LDA (SRC),Y + ADC ESTKH,X + STA ESTKH,X + LDY IPY + JMP NEXTOP ;* ;* INDEX VALUE FROM ABSOLUTE ADDRESS ;* -IDXAB LDA #$60 ; RTS - STA NEXTOP - JSR LAB - LDA #$C8 ; INY - STA NEXTOP - JMP IDXW -IDXAW LDA #$60 ; RTS - STA NEXTOP - JSR LAW - LDA #$C8 ; INY - STA NEXTOP - JMP IDXW +IDXAB INY ;+INC_IP + LDA (IP),Y + STA ESTKH-2,X + INY ;+INC_IP + LDA (IP),Y + STA ESTKH-1,X + LDA (ESTKH-2,X) + STY IPY + LDY #$00 + ASL + BCC + + INY + CLC ++ ADC ESTKL,X + STA ESTKL,X + TYA + ADC ESTKH,X + STA ESTKH,X + LDY IPY + JMP NEXTOP +IDXAW INY ;+INC_IP + LDA (IP),Y + STA SRCL + INY ;+INC_IP + LDA (IP),Y + STA SRCH + STY IPY + LDY #$00 + LDA (SRC),Y + ASL + STA TMPL + INY + LDA (SRC),Y + ROL + STA TMPH + LDA TMPL + CLC + ADC ESTKL,X + STA ESTKL,X + LDA TMPH + ADC ESTKH,X + STA ESTKH,X + LDY IPY + JMP NEXTOP ;* ;* STORE VALUE TO ADDRESS ;* @@ -694,6 +773,8 @@ DLB INY ;+INC_IP TAY LDA ESTKL,X STA (IFP),Y + LDA #$00 + STA ESTKH,X LDY IPY JMP NEXTOP DLW INY ;+INC_IP @@ -754,6 +835,8 @@ DAB INY ;+INC_IP STA ESTKH-1,X LDA ESTKL,X STA (ESTKH-2,X) + LDA #$00 + STA ESTKH,X JMP NEXTOP DAW INY ;+INC_IP LDA (IP),Y @@ -850,20 +933,17 @@ SEL INX DEY LDA (IP),Y STA TMPL ; CASE COUNT - LDA ESTKL-1,X INC IPL BNE CASELP INC IPH -CASELP CMP (IP),Y - BNE + +CASELP LDA ESTKL-1,X + CMP (IP),Y + BEQ + LDA ESTKH-1,X INY - CMP (IP),Y - BEQ BRNCH - LDA ESTKL-1,X - DEY -+ INY - INY + SBC (IP),Y + BMI CASEEND +- INY INY DEC TMPL BEQ FIXNEXT @@ -871,6 +951,27 @@ CASELP CMP (IP),Y BNE CASELP INC IPH BNE CASELP ++ LDA ESTKH-1,X + INY + SBC (IP),Y + BEQ BRNCH + BPL - +CASEEND LDA #$00 + STA TMPH + DEC TMPL + LDA TMPL + ASL ; SKIP REMAINING CASES + ROL TMPH + ASL + ROL TMPH +; CLC + ADC IPL + STA IPL + LDA TMPH + ADC IPH + STA IPH + INY + INY FIXNEXT TYA LDY #$00 SEC @@ -1007,15 +1108,6 @@ ADDBRLE LDA ESTKL,X INX BNE _BRLE ;* -;* INDIRECT CALL TO ADDRESS (NATIVE CODE) -;* -ICAL LDA ESTKL,X - STA TMPL - LDA ESTKH,X - STA TMPH - INX - BNE _CALL -;* ;* CALL INTO ABSOLUTE ADDRESS (NATIVE CODE) ;* CALL INY ;+INC_IP @@ -1024,8 +1116,8 @@ CALL INY ;+INC_IP INY ;+INC_IP LDA (IP),Y STA TMPH -_CALL TYA - CLC + TYA + SEC ADC IPL PHA LDA IPH @@ -1036,7 +1128,29 @@ _CALL TYA STA IPH PLA STA IPL - LDY #$01 + LDY #$00 + JMP FETCHOP +;* +;* INDIRECT CALL TO ADDRESS (NATIVE CODE) +;* +ICAL LDA ESTKL,X + STA TMPL + LDA ESTKH,X + STA TMPH + INX + TYA + SEC + ADC IPL + PHA + LDA IPH + ADC #$00 + PHA + JSR JMPTMP + PLA + STA IPH + PLA + STA IPL + LDY #$00 JMP FETCHOP ;* ;* ENTER FUNCTION WITH FRAME SIZE AND PARAM COUNT @@ -1076,28 +1190,39 @@ LEAVE INY ;+INC_IP RTS + INC IFPH RET RTS +;* +;* RETURN TO NATIVE CODE +;* +NATV TYA ; FLATTEN IP + SEC + ADC IPL + STA IPL + BCS + + JMP (IP) ++ INC IPH + JMP (IP) CMD !SOURCE "vmsrc/c64/cmd.a" SEGEND = * -VMINIT JSR $FFE7 ; CLOSE ALL CHANNELS - LDY #$10 ; INSTALL PAGE 0 FETCHOP ROUTINE +VMINIT JSR $FFE7 ; CLOSE ALL CHANNELS + LDY #$10 ; INSTALL PAGE 0 FETCHOP ROUTINE - LDA PAGE0-1,Y STA DROP-1,Y DEY BNE - - LDA #$4C ; SET JMPTMP OPCODE + LDA #$4C ; SET JMPTMP OPCODE STA JMPTMP - STY IFPL ; INIT FRAME POINTER TO $D000 + STY IFPL ; INIT FRAME POINTER TO $D000 LDA #$D0 STA IFPH - LDA #SEGEND STA $0101 - LDX #$FF ; INIT STACK POINTER + LDX #$FF ; INIT STACK POINTER TXS - LDX #ESTKSZ/2 ; INIT EVAL STACK INDEX + LDX #ESTKSZ/2 ; INIT EVAL STACK INDEX LDA $01 - AND #$FE ; SWAP OUT BASIC ROM + AND #$FE ; SWAP OUT BASIC ROM STA $01 JMP CMD PAGE0 = * @@ -1105,9 +1230,9 @@ PAGE0 = * ;* ;* INTERP BYTECODE INNER LOOP ;* - INX ; DROP - INY ; NEXTOP - LDA $FFFF,Y ; FETCHOP @ $F3, IP MAPS OVER $FFFF @ $F4 + INX ; DROP + INY ; NEXTOP + LDA $FFFF,Y ; FETCHOP @ $F3, IP MAPS OVER $FFFF @ $F4 STA OPIDX JMP (OPTBL) } From c1d849946fba7f7461fb5148dbe0868842b6567a Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Tue, 17 Apr 2018 10:39:05 -0700 Subject: [PATCH 29/74] BIG change so FOR/NEXT exits with proper terminal value in variable --- src/libsrc/apple/uthernet2.pla | 198 +++++++++++++++++---------------- src/libsrc/dhcp.pla | 6 +- src/libsrc/inet.pla | 49 ++++---- src/libsrc/jit16core.pla | 32 +++--- src/libsrc/jitcore.pla | 28 ++--- src/toolsrc/codegen.pla | 20 ++++ src/toolsrc/lex.pla | 4 +- src/toolsrc/parse.c | 25 ++--- src/toolsrc/parse.pla | 21 ++-- src/toolsrc/plasm.pla | 2 +- src/vmsrc/apple/plvm01.s | 20 +--- src/vmsrc/apple/plvm02.s | 20 +--- src/vmsrc/apple/plvm03.s | 42 +++---- src/vmsrc/apple/plvm802.s | 24 +--- src/vmsrc/apple/plvmjit02.s | 20 +--- src/vmsrc/c64/plvmc64.s | 20 +--- 16 files changed, 237 insertions(+), 294 deletions(-) diff --git a/src/libsrc/apple/uthernet2.pla b/src/libsrc/apple/uthernet2.pla index fc63e82..26bc120 100644 --- a/src/libsrc/apple/uthernet2.pla +++ b/src/libsrc/apple/uthernet2.pla @@ -180,12 +180,12 @@ end // // Local network parameters // -const MAX_WIZ_CHANNELS = 4 +const MAX_WIZ_CHANNELS = 4 // // Channel protocols // -const WIZ_PROTO_CLOSED = 0 -const WIZ_PROTO_TCP = 1 +const WIZ_PROTO_CLOSED = 0 +const WIZ_PROTO_TCP = 1 const WIZ_PROTO_UDP = 2 const WIZ_PROTO_IP = 3 const WIZ_PROTO_RAW = 4 @@ -212,7 +212,7 @@ struc t_channel word channel_recv_func word channel_recv_parm end -byte[t_channel * MAX_WIZ_CHANNELS] wizChannel +byte[t_channel] wizChannel[MAX_WIZ_CHANNELS] // // Service ICMP hook // @@ -227,11 +227,11 @@ end // Swap bytes in word // asm swab(val) - LDA ESTKL,X - LDY ESTKH,X - STA ESTKH,X - STY ESTKL,X - RTS + LDA ESTKL,X + LDY ESTKH,X + STA ESTKH,X + STY ESTKL,X + RTS end // // Wiznet I/O functions @@ -239,118 +239,122 @@ end // POKE WORD TO I/O SPACE // Note: Big Endian format // -asm _pokeiow(val) - LDA ESTKH,X +asm _pokeiow(val)#0 + LDA ESTKH,X end asm _pokeiowl - STA $C000 - LDA ESTKL,X + STA $C000 + LDA ESTKL,X end asm _pokeiowh - STA $C000 - RTS + STA $C000 + INX + RTS end // // POKE BYTE TO I/O SPACE // -asm _pokeio(val) - LDA ESTKL,X +asm _pokeio(val)#0 + LDA ESTKL,X end asm _pokeiol - STA $C000 - RTS + STA $C000 + INX + RTS end // // PEEK BYTE FROM I/O SPACE // asm _peekio - DEX + DEX end asm _peekiol - LDA $C000 - STA ESTKL,X - LDA #$00 - STA ESTKH,X - RTS + LDA $C000 + STA ESTKL,X + LDA #$00 + STA ESTKH,X + RTS end // // PEEK WORD FROM I/O SPACE // Note: Big Endian format // asm _peekiow - DEX + DEX end asm _peekiowl - LDA $C000 - STA ESTKH,X + LDA $C000 + STA ESTKH,X end asm _peekiowh - LDA $C000 - STA ESTKL,X - RTS + LDA $C000 + STA ESTKL,X + RTS end // // WRITE DATA INTO I/O SPACE // pokedata(BUF, LEN) // -asm pokedata(buf, len) - LDA ESTKL+1,X - STA SRCL - LDA ESTKH+1,X - STA SRCH - LDY ESTKL,X - BEQ POKELP - LDY #$00 - INC ESTKH,X -POKELP LDA (SRC),Y +asm pokedata(buf, len)#0 + LDA ESTKL+1,X + STA SRCL + LDA ESTKH+1,X + STA SRCH + LDY ESTKL,X + BEQ POKELP + LDY #$00 + INC ESTKH,X +POKELP LDA (SRC),Y end asm _pokedata - STA $C000 - INY - BNE + - INC SRCH -+ DEC ESTKL,X - BNE POKELP - DEC ESTKH,X - BNE POKELP - INX - RTS + STA $C000 + INY + BNE + + INC SRCH ++ DEC ESTKL,X + BNE POKELP + DEC ESTKH,X + BNE POKELP + INX + INX + RTS end // // READ DATA FROM I/O SPACE // peekdata(BUF, LEN) // -asm peekdata(buf, len) - LDA ESTKL+1,X - STA DSTL - LDA ESTKH+1,X - STA DSTH - LDY ESTKL,X - BEQ PEEKLP - LDY #$00 - INC ESTKH,X +asm peekdata(buf, len)#0 + LDA ESTKL+1,X + STA DSTL + LDA ESTKH+1,X + STA DSTH + LDY ESTKL,X + BEQ PEEKLP + LDY #$00 + INC ESTKH,X end asm _peekdata -PEEKLP LDA $C000 - STA (DST),Y - INY - BNE + - INC DSTH -+ DEC ESTKL,X - BNE PEEKLP - DEC ESTKH,X - BNE PEEKLP - INX - RTS +PEEKLP LDA $C000 + STA (DST),Y + INY + BNE + + INC DSTH ++ DEC ESTKL,X + BNE PEEKLP + DEC ESTKH,X + BNE PEEKLP + INX + INX + RTS end -def pokeiow(io, data) +def pokeiow(io, data)#0 _pokeiowl.1 = io _pokeiowh.1 = io+1 - return _pokeiow(data) + _pokeiow(data) end -def pokeio(io, data) +def pokeio(io, data)#0 _pokeiol.1 = io - return _pokeio(data) + _pokeio(data) end def peekio(io) _peekiol.1 = io @@ -361,26 +365,26 @@ def peekiow(io) _peekiowh.1 = io+1 return _peekiow() end -def pokereg(reg, data) +def pokereg(reg, data)#0 _pokeiow(reg) - return _pokeio(data) + _pokeio(data) end def peekreg(reg) _pokeiow(reg) return _peekio() end -def pokeregs(reg, buf, len) +def pokeregs(reg, buf, len)#0 _pokeiow(reg) - return pokedata(buf, len) + pokedata(buf, len) end -def peekregs(reg, buf, len) +def peekregs(reg, buf, len)#0 _pokeiow(reg) - return peekdata(buf, len) + peekdata(buf, len) end -def pokeregw(reg, dataw) +def pokeregw(reg, dataw)#0 _pokeiow(reg) _pokeio(dataw.1) - return _pokeio(dataw.0) + _pokeio(dataw.0) end def peekregw(reg) word dataw @@ -415,7 +419,7 @@ def wizSendUDP(wiz, ipdst, portdst, data, len) splitlen = WIZ_TXSIZE - txrr pokeregs(wizdata + txrr, data, splitlen) pokeregs(wizdata, data + splitlen, len - splitlen) - else + else pokeregs(wizdata + txrr, data, len) fin // @@ -480,14 +484,14 @@ end // def wizCloseUDP(wiz) if isuge(wiz, @wizChannel) and isult(wiz, @wizChannel + MAX_WIZ_CHANNELS * t_channel) - // - // Clear notiications on this port - // + // + // Clear notiications on this port + // if wiz->channel_proto == WIZ_PROTO_UDP wiz->channel_proto = WIZ_PROTO_CLOSED pokereg(wiz=>channel_regs + WIZ_SnCR, $10) // CLOSE - return 0 - fin + return 0 + fin fin // // Invalid port @@ -508,8 +512,8 @@ def wizListenTCP(lclport, callback, param) for i = 1 to MAX_WIZ_CHANNELS if wiz->channel_proto == WIZ_PROTO_TCP and wiz->channel_state == TCP_STATE_LISTEN and wiz=>channel_lclport == lclport break - fin - wiz = wiz + t_channel + fin + wiz = wiz + t_channel next if i > MAX_WIZ_CHANNELS // @@ -519,8 +523,8 @@ def wizListenTCP(lclport, callback, param) for i = 1 to MAX_WIZ_CHANNELS if !wiz->channel_proto break - fin - wiz = wiz + t_channel + fin + wiz = wiz + t_channel next if i > MAX_WIZ_CHANNELS return 0 @@ -670,10 +674,10 @@ end def wizSetParam(wiz, param) if wiz->channel_proto == WIZ_PROTO_UDP or wiz->channel_proto == WIZ_PROTO_TCP // - // Update param on this port - // - wiz=>channel_recv_parm = param - return 0 + // Update param on this port + // + wiz=>channel_recv_parm = param + return 0 fin // // Invalid port diff --git a/src/libsrc/dhcp.pla b/src/libsrc/dhcp.pla index 1a4f32f..ef3bc25 100644 --- a/src/libsrc/dhcp.pla +++ b/src/libsrc/dhcp.pla @@ -137,7 +137,7 @@ end def recvDHCP(remip, remport, pkt, len, param) word servopts, maskopts, gwopts, dnsopts - //putip(remip);putc(':');puti(remport);putln + //puts("recvDHCP: ");putip(remip);putc(':');puti(remport);putln //dumpdhcp(pkt) if pkt=>dhcp_xid:0 == $0201 and pkt=>dhcp_xid:2 == $0403 when pkt->dhcp_opts.[parseopts(@pkt->dhcp_opts, 53) + 2] @@ -155,10 +155,10 @@ def recvDHCP(remip, remport, pkt, len, param) iNet:sendUDP(portDHCP, 0, DHCP_SERVER_PORT, @DHCP, @endDHCP - @DHCP) break is DHCP_ACK - optsOP.2 = DHCP_ACK // // Copy parameters to working copy // + optsOP.2 = DHCP_ACK memcpy(@localip, @pkt->dhcp_yourip, IP4ADR_SIZE) maskopts = parseopts(@pkt->dhcp_opts, 1) + 2 if maskopts >= 0 @@ -187,7 +187,7 @@ iNet:getInterfaceHA(@optsCID.3) // // Clear our local IP address // -iNet:setInterfaceIP(@zeros,@ones, @zeros) +iNet:setInterfaceIP(@zeros, @ones, @zeros) // // Prepare to receive DHCP packets from a server // diff --git a/src/libsrc/inet.pla b/src/libsrc/inet.pla index b25e0ed..246e5e8 100644 --- a/src/libsrc/inet.pla +++ b/src/libsrc/inet.pla @@ -33,7 +33,7 @@ end // // External interface to net class. Must be first. // -export byte[t_inet] iNet +res[t_inet] iNet // // List of loadable network device drivers // @@ -87,14 +87,14 @@ def parseIP(ipstr, ipaddr) endstr = ipstr + ^ipstr for i = 0 to 3 - ipstr = ipstr + 1 - while ^ipstr >= '0' and ^ipstr <= '9' and ipstr <= endstr - ipaddr->[i] = ipaddr->[i] * 10 + ^ipstr - '0' ipstr = ipstr + 1 - loop - if ^ipstr <> '.' and ipstr < endstr - return 0 - fin + while ^ipstr >= '0' and ^ipstr <= '9' and ipstr <= endstr + ipaddr->[i] = ipaddr->[i] * 10 + ^ipstr - '0' + ipstr = ipstr + 1 + loop + if ^ipstr <> '.' and ipstr < endstr + return 0 + fin next return i == 3 end @@ -105,11 +105,11 @@ def parseDomain(domstr, msgptr) l = 0 for i = 1 to ^domstr if domstr->[i] == '.' - msgptr->[l] = i - l - 1 - l = i - else - msgptr->[i] = domstr->[i] - fin + msgptr->[l] = i - l - 1 + l = i + else + msgptr->[i] = domstr->[i] + fin next msgptr->[l] = i - l - 1 msgptr = msgptr + i @@ -171,7 +171,7 @@ def iNetResolve(namestr, ipaddr) // // Query Domain Name Server for address // - dnspkt = heapmark // Use heap as working DNS query packet + dnspkt = heapalloc(^namestr + t_dnshdr + 8) // Use heap as working DNS query packet msgptr = dnspkt msgptr=>dnsID = $BEEF msgptr=>dnsCode = $0001 // RD (Recursion Desired) @@ -181,9 +181,8 @@ def iNetResolve(namestr, ipaddr) msgptr=>dnsArCount = 0 msgptr = parseDomain(namestr, msgptr + t_dnshdr) msgptr=>0 = $0100 // BE TYPE = Address - msgptr=>2 = $0100 // BE CLASS = INternet + msgptr=>2 = $0100 // BE CLASS = Internet msglen = msgptr - dnspkt + 4 - heapalloc(msglen) // // Prepare to receive DNS answer from server // @@ -210,21 +209,17 @@ def iNetInit // Look for net hardware // while ^driver - //puts(driver);putln if cmdsys:modexec(driver) >= 0 - break + // + // Get an IP address + // + cmdsys:modexec("DHCP") + iNet:resolveIP = @iNetResolve + return @iNet fin driver = driver + ^driver + 1 loop - if !^driver - return 0 - fin - // - // Get an IP address - // - cmdsys:modexec("DHCP") - iNet:resolveIP = @iNetResolve - return @iNet + return NULL end // diff --git a/src/libsrc/jit16core.pla b/src/libsrc/jit16core.pla index d4417d5..b3ab4be 100644 --- a/src/libsrc/jit16core.pla +++ b/src/libsrc/jit16core.pla @@ -982,14 +982,13 @@ def compiler(defptr)#0 codeptr=>5 = $0350 // BVC +3 codeptr->7 = $49 // EOR #$8000 codeptr=>8 = $8000 - codeptr=>10 = $0510 // BPL +5 - codeptr=>12 = $6868 // PLA; PLA - codeptr->14 = $4C // JMP abs - codeptr=>15 = addrxlate=>[dest] - if not (codeptr->16 & $80) // Unresolved address list - addrxlate=>[dest] = codeptr + 15 - *jitcodeptr + codeptr=>10 = $0310 // BPL +3 + codeptr->12 = $4C // JMP abs + codeptr=>13 = addrxlate=>[dest] + if not (codeptr->14 & $80) // Unresolved address list + addrxlate=>[dest] = codeptr + 13 - *jitcodeptr fin - codeptr = codeptr + 17 + codeptr = codeptr + 5 A_IS_TOS = FALSE break is $A2 // BRLT - FOR/NEXT SPECIFIC TEST & BRANCH @@ -1005,14 +1004,13 @@ def compiler(defptr)#0 codeptr=>3 = $0350 // BVC +3 codeptr->5 = $49 // EOR #$8000 codeptr=>6 = $8000 - codeptr=>8 = $0510 // BPL +5 - codeptr=>10 = $6868 // PLA; PLA - codeptr->12 = $4C // JMP abs - codeptr=>13 = addrxlate=>[dest] - if not (codeptr->14 & $80) // Unresolved address list - addrxlate=>[dest] = codeptr + 13 - *jitcodeptr + codeptr=>8 = $0310 // BPL +3 + codeptr->10 = $4C // JMP abs + codeptr=>11 = addrxlate=>[dest] + if not (codeptr->12 & $80) // Unresolved address list + addrxlate=>[dest] = codeptr + 11 - *jitcodeptr fin - codeptr = codeptr + 15 + codeptr = codeptr + 13 A_IS_TOS = FALSE break is $A4 // INCBRLE - FOR/NEXT SPECIFIC INC & TEST & BRANCH @@ -1055,8 +1053,7 @@ def compiler(defptr)#0 if not (codeptr->14 & $80) // Unresolved address list addrxlate=>[dest] = codeptr + 13 - *jitcodeptr fin - codeptr=>15 = $6868 // PLA; PLA - codeptr = codeptr + 17 + codeptr = codeptr + 15 A_IS_TOS = FALSE break is $A8 // DECBRGR - FOR/NEXT SPECIFIC DEC & TEST & BRANCH @@ -1100,8 +1097,7 @@ def compiler(defptr)#0 if not (codeptr->12 & $80) // Unresolved address list addrxlate=>[dest] = codeptr + 11 - *jitcodeptr fin - codeptr=>13 = $6868 // PLA; PLA - codeptr = codeptr + 15 + codeptr = codeptr + 13 A_IS_TOS = FALSE break is $AC // BRAND - LOGICAL AND SPECIFIC BRANCH diff --git a/src/libsrc/jitcore.pla b/src/libsrc/jitcore.pla index 788b57b..2b0aa13 100644 --- a/src/libsrc/jitcore.pla +++ b/src/libsrc/jitcore.pla @@ -1172,14 +1172,13 @@ def compiler(defptr)#0 codeptr=>6 = $C0F5//+(VX<<8) // SBC ESTKH codeptr=>8 = $0250 // BVC +2 codeptr=>10 = $8049 // EOR #$80 - codeptr=>12 = $0510 // BPL +5 - codeptr=>14 = $E8E8 // INX; INX - codeptr->16 = $4C // JMP abs - codeptr=>17 = addrxlate=>[dest] - if not (codeptr->18 & $80) // Unresolved address list - addrxlate=>[dest] = codeptr + 17 - *jitcodeptr + codeptr=>12 = $0310 // BPL +3 + codeptr->14 = $4C // JMP abs + codeptr=>15 = addrxlate=>[dest] + if not (codeptr->16 & $80) // Unresolved address list + addrxlate=>[dest] = codeptr + 15 - *jitcodeptr fin - codeptr = codeptr + 19 + codeptr = codeptr + 17 A_IS_TOSL = FALSE break is $A2 // BRLT - FOR/NEXT SPECIFIC TEST & BRANCH @@ -1200,14 +1199,13 @@ def compiler(defptr)#0 codeptr=>4 = $C0F5+$0100//+(VX<<8) // SBC ESTKH+1 codeptr=>6 = $0250 // BVC +2 codeptr=>8 = $8049 // EOR #$80 - codeptr=>10 = $0510 // BPL +5 - codeptr=>12 = $E8E8 // INX; INX - codeptr->14 = $4C // JMP abs - codeptr=>15 = addrxlate=>[dest] - if not (codeptr->16 & $80) // Unresolved address list - addrxlate=>[dest] = codeptr + 15 - *jitcodeptr + codeptr=>10 = $0310 // BPL +3 + codeptr->12 = $4C // JMP abs + codeptr=>13 = addrxlate=>[dest] + if not (codeptr->14 & $80) // Unresolved address list + addrxlate=>[dest] = codeptr + 13 - *jitcodeptr fin - codeptr = codeptr + 17 + codeptr = codeptr + 15 A_IS_TOSL = FALSE break is $A4 // INCBRLE - FOR/NEXT SPECIFIC INC & TEST & BRANCH @@ -1259,7 +1257,6 @@ def compiler(defptr)#0 addrxlate=>[dest] = codeptr + 15 - *jitcodeptr fin codeptr = codeptr + 17 - VX = VX + 2 // INX; INX A_IS_TOSL = FALSE break is $A8 // DECBRGR - FOR/NEXT SPECIFIC DEC & TEST & BRANCH @@ -1321,7 +1318,6 @@ def compiler(defptr)#0 addrxlate=>[dest] = codeptr + 13 - *jitcodeptr fin codeptr = codeptr + 15 - VX = VX + 2 // INX; INX A_IS_TOSL = FALSE break is $AC // BRAND - LOGICAL AND SPECIFIC BRANCH diff --git a/src/toolsrc/codegen.pla b/src/toolsrc/codegen.pla index d098aa0..8ad0fb7 100644 --- a/src/toolsrc/codegen.pla +++ b/src/toolsrc/codegen.pla @@ -153,6 +153,26 @@ def emit_code(bval)#0 codeptr++ if codeptr - codebuff > codebufsz; exit_err(ERR_OVER|ERR_CODE|ERR_TABLE); fin end +def emit_slb(offset)#0 + emit_pending_seq + emit_byte($74) + emit_byte(offset) +end +def emit_slw(offset)#0 + emit_pending_seq + emit_byte($76) + emit_byte(offset) +end +def emit_sab(tag, offset)#0 + emit_pending_seq + emit_byte($78) + emit_addr(tag, offset) +end +def emit_saw(tag, offset)#0 + emit_pending_seq + emit_byte($7A) + emit_addr(tag, offset) +end def emit_dlb(offset)#0 emit_pending_seq emit_byte($6C) diff --git a/src/toolsrc/lex.pla b/src/toolsrc/lex.pla index 934c351..616c248 100644 --- a/src/toolsrc/lex.pla +++ b/src/toolsrc/lex.pla @@ -36,7 +36,9 @@ // loop // chrptr = tknptr - 1 // while keywrds[keypos] == tknlen -// i = 1; while i <= tknlen and ^(chrptr + i) == keywrds[keypos + i]; i++; loop +// for i = 1 to tknlen +// if ^(chrptr + i) <> keywrds[keypos + i]; break; fin +// next // if i > tknlen // return keywrds[keypos + keywrds[keypos] + 1] // fin diff --git a/src/toolsrc/parse.c b/src/toolsrc/parse.c index 1301921..7e3c821 100755 --- a/src/toolsrc/parse.c +++ b/src/toolsrc/parse.c @@ -8,7 +8,7 @@ int parse_mods(void); -int infunc = 0, break_tag = 0, cont_tag = 0, stack_loop = 0, infor = 0; +int infunc = 0, break_tag = 0, cont_tag = 0, stack_loop = 0; long infuncvals = 0; t_token prevstmnt; static int lambda_num = 0; @@ -831,7 +831,7 @@ t_opseq *parse_set(t_opseq *codeseq) int parse_stmnt(void) { int tag_prevbrk, tag_prevcnt, tag_else, tag_endif, tag_while, tag_wend, tag_repeat, tag_for, tag_choice, tag_of; - int type, addr, step, cfnvals, prev_for, constsize, casecnt, i; + int type, addr, step, cfnvals, constsize, casecnt, i; int *caseval, *casetag; long constval; char *idptr; @@ -891,8 +891,6 @@ int parse_stmnt(void) parse_error("Missing IF/FIN"); break; case WHILE_TOKEN: - prev_for = infor; - infor = 0; tag_while = tag_new(BRANCH_TYPE); tag_wend = tag_new(BRANCH_TYPE); tag_prevcnt = cont_tag; @@ -917,11 +915,8 @@ int parse_stmnt(void) emit_codetag(tag_wend); break_tag = tag_prevbrk; cont_tag = tag_prevcnt; - infor = prev_for; break; case REPEAT_TOKEN: - prev_for = infor; - infor = 0; tag_prevbrk = break_tag; break_tag = tag_new(BRANCH_TYPE); tag_repeat = tag_new(BRANCH_TYPE); @@ -945,12 +940,9 @@ int parse_stmnt(void) emit_seq(seq); emit_codetag(break_tag); break_tag = tag_prevbrk; - infor = prev_for; break; case FOR_TOKEN: stack_loop += 2; - prev_for = infor; - infor = 1; tag_prevbrk = break_tag; break_tag = tag_new(BRANCH_TYPE); tag_for = tag_new(BRANCH_TYPE); @@ -1029,13 +1021,15 @@ int parse_stmnt(void) emit_decbrge(tag_for); } emit_codetag(break_tag); + if (type & LOCAL_TYPE) + type & BYTE_TYPE ? emit_slb(addr) : emit_slw(addr); + else + type & BYTE_TYPE ? emit_sab(addr, 0, type) : emit_saw(addr, 0, type); + emit_drop(); break_tag = tag_prevbrk; - infor = prev_for; stack_loop -= 2; break; case CASE_TOKEN: - prev_for = infor; - infor = 0; tag_prevbrk = break_tag; break_tag = tag_new(BRANCH_TYPE); tag_choice = tag_new(BRANCH_TYPE); @@ -1111,15 +1105,10 @@ int parse_stmnt(void) free(casetag); emit_codetag(break_tag); break_tag = tag_prevbrk; - infor = prev_for; break; case BREAK_TOKEN: if (break_tag) - { - if (infor) - emit_drop2(); emit_brnch(break_tag); - } else parse_error("BREAK without loop"); break; diff --git a/src/toolsrc/parse.pla b/src/toolsrc/parse.pla index c846fcc..c95f8be 100644 --- a/src/toolsrc/parse.pla +++ b/src/toolsrc/parse.pla @@ -596,7 +596,7 @@ def parse_set(codeseq) return codeseq end def parse_stmnt - byte type, elem_type, elem_size, cfnvals, prev_for + byte type, elem_type, elem_size, cfnvals word seq, fromseq, toseq, tag_prevbrk, tag_prevcnt, tag_else, tag_endif, tag_while, tag_wend word tag_repeat, tag_for, tag_choice, tag_of, idptr, addr, stepdir word caseconst, casecnt, caseval, casetag, i @@ -650,8 +650,6 @@ def parse_stmnt if token <> FIN_TKN; exit_err(ERR_MISS|ERR_CLOSE|ERR_STATE); fin break is WHILE_TKN - prev_for = infor - infor = FALSE tag_while = new_tag(RELATIVE_FIXUP) tag_wend = new_tag(RELATIVE_FIXUP) tag_prevcnt = cont_tag @@ -676,11 +674,8 @@ def parse_stmnt emit_tag(tag_wend) break_tag = tag_prevbrk cont_tag = tag_prevcnt - infor = prev_for break is REPEAT_TKN - prev_for = infor - infor = FALSE tag_repeat = new_tag(RELATIVE_FIXUP) tag_prevbrk = break_tag break_tag = new_tag(RELATIVE_FIXUP) @@ -704,11 +699,8 @@ def parse_stmnt emit_seq(seq) emit_tag(break_tag) break_tag = tag_prevbrk - infor = prev_for break is FOR_TKN - prev_for = infor - infor = TRUE stack_loop = stack_loop + 2 tag_for = new_tag(RELATIVE_FIXUP) tag_prevcnt = cont_tag @@ -782,13 +774,16 @@ def parse_stmnt fin fin emit_tag(break_tag) + if type & LOCAL_TYPE + if type & BYTE_TYPE; emit_slb(addr); else; emit_slw(addr); fin + else + if type & BYTE_TYPE; emit_sab(addr, 0); else; emit_saw(addr, 0); fin + fin + emit_code(DROP_CODE) break_tag = tag_prevbrk stack_loop = stack_loop - 2 - infor = prev_for break is CASE_TKN - prev_for = infor - infor = FALSE tag_prevbrk = break_tag break_tag = new_tag(RELATIVE_FIXUP) tag_choice = new_tag(RELATIVE_FIXUP) @@ -861,11 +856,9 @@ def parse_stmnt heaprelease(caseval) emit_tag(break_tag) break_tag = tag_prevbrk - infor = prev_for break is BREAK_TKN if break_tag - if infor; emit_code(DROP2_CODE); fin emit_branch(break_tag) else exit_err(ERR_INVAL|ERR_STATE) diff --git a/src/toolsrc/plasm.pla b/src/toolsrc/plasm.pla index e129806..82f9e7a 100755 --- a/src/toolsrc/plasm.pla +++ b/src/toolsrc/plasm.pla @@ -298,7 +298,7 @@ const RVALUE = 1 const LAMBDANUM = 16 word strconstbuff word strconstptr -byte infunc, inlambda, infor +byte infunc, inlambda byte stack_loop byte prevstmnt word infuncvals diff --git a/src/vmsrc/apple/plvm01.s b/src/vmsrc/apple/plvm01.s index 8f073ca..3f9b738 100644 --- a/src/vmsrc/apple/plvm01.s +++ b/src/vmsrc/apple/plvm01.s @@ -933,20 +933,16 @@ BRGT LDA ESTKL+1,X SBC ESTKH,X BVS + BPL NOBRNCH -- INX ; DROP FOR VALUES - INX - BNE BRNCH ; BMI BRNCH + BMI BRNCH BRLT LDA ESTKL,X CMP ESTKL+1,X LDA ESTKH,X SBC ESTKH+1,X BVS + BPL NOBRNCH - INX ; DROP FOR VALUES - INX - BNE BRNCH ; BMI BRNCH + BMI BRNCH + BMI NOBRNCH - BPL - + BPL BRNCH DECBRGE DEC ESTKL,X LDA ESTKL,X CMP #$FF @@ -958,9 +954,7 @@ _BRGE LDA ESTKL,X SBC ESTKH+1,X BVS + BPL BRNCH -- INX ; DROP FOR VALUES - INX - BNE NOBRNCH ; BMI NOBRNCH + BMI NOBRNCH INCBRLE INC ESTKL,X BNE _BRLE INC ESTKH,X @@ -970,11 +964,9 @@ _BRLE LDA ESTKL+1,X SBC ESTKH,X BVS + BPL BRNCH - INX ; DROP FOR VALUES - INX - BNE NOBRNCH ; BMI NOBRNCH + BMI NOBRNCH + BMI BRNCH - BPL - + BPL NOBRNCH SUBBRGE LDA ESTKL+1,X SEC SBC ESTKL,X diff --git a/src/vmsrc/apple/plvm02.s b/src/vmsrc/apple/plvm02.s index a24cabf..6df5f81 100755 --- a/src/vmsrc/apple/plvm02.s +++ b/src/vmsrc/apple/plvm02.s @@ -1298,20 +1298,16 @@ BRGT LDA ESTKL+1,X SBC ESTKH,X BVS + BPL NOBRNCH -- INX ; DROP FOR VALUES - INX - BNE BRNCH ; BMI BRNCH + BMI BRNCH BRLT LDA ESTKL,X CMP ESTKL+1,X LDA ESTKH,X SBC ESTKH+1,X BVS + BPL NOBRNCH - INX ; DROP FOR VALUES - INX - BNE BRNCH ; BMI BRNCH + BMI BRNCH + BMI NOBRNCH - BPL - + BPL BRNCH DECBRGE DEC ESTKL,X LDA ESTKL,X CMP #$FF @@ -1323,9 +1319,7 @@ _BRGE LDA ESTKL,X SBC ESTKH+1,X BVS + BPL BRNCH -- INX ; DROP FOR VALUES - INX - BNE NOBRNCH ; BMI NOBRNCH + BMI NOBRNCH INCBRLE INC ESTKL,X BNE _BRLE INC ESTKH,X @@ -1335,11 +1329,9 @@ _BRLE LDA ESTKL+1,X SBC ESTKH,X BVS + BPL BRNCH - INX ; DROP FOR VALUES - INX - BNE NOBRNCH ; BMI NOBRNCH + BMI NOBRNCH + BMI BRNCH - BPL - + BPL NOBRNCH SUBBRGE LDA ESTKL+1,X SEC SBC ESTKL,X diff --git a/src/vmsrc/apple/plvm03.s b/src/vmsrc/apple/plvm03.s index 70df616..d6f30ad 100755 --- a/src/vmsrc/apple/plvm03.s +++ b/src/vmsrc/apple/plvm03.s @@ -1262,32 +1262,16 @@ BRGT LDA ESTKL+1,X CMP ESTKL,X LDA ESTKH+1,X SBC ESTKH,X - BVS + - BPL NOBRNCH -- INX ; DROP FOR VALUES - INX - BNE BRNCH ; BMI BRNCH + BVS ++ +- BPL NOBRNCH + BMI BRNCH BRLT LDA ESTKL,X CMP ESTKL+1,X LDA ESTKH,X SBC ESTKH+1,X - BVS + + BVS ++ BPL NOBRNCH - BMI - -+ BMI NOBRNCH - BPL - -INCBRLE INC ESTKL,X - BNE _BRLE - INC ESTKH,X -_BRLE LDA ESTKL+1,X - CMP ESTKL,X - LDA ESTKH+1,X - SBC ESTKH,X - BVS + - BPL BRNCH -- INX ; DROP FOR VALUES - INX - BNE NOBRNCH ; BMI NOBRNCH + BMI BRNCH DECBRGE DEC ESTKL,X LDA ESTKL,X CMP #$FF @@ -1297,11 +1281,19 @@ _BRGE LDA ESTKL,X + CMP ESTKL+1,X LDA ESTKH,X SBC ESTKH+1,X - BVS + + BVS - BPL BRNCH - BMI - -+ BMI BRNCH - BPL - + BMI NOBRNCH +INCBRLE INC ESTKL,X + BNE _BRLE + INC ESTKH,X +_BRLE LDA ESTKL+1,X + CMP ESTKL,X + LDA ESTKH+1,X + SBC ESTKH,X + BVS - +++ BPL BRNCH + BMI NOBRNCH SUBBRGE LDA ESTKL+1,X SEC SBC ESTKL,X diff --git a/src/vmsrc/apple/plvm802.s b/src/vmsrc/apple/plvm802.s index c8fb981..3fa5ee2 100644 --- a/src/vmsrc/apple/plvm802.s +++ b/src/vmsrc/apple/plvm802.s @@ -1543,21 +1543,15 @@ BRGT LDA NOS,S SBC TOS,S BVS + BPL NOBRNCH - PLA ; DROP FOR VALUES - PLA - BRA BRNCH ; BMI BRNCH + BMI BRNCH BRLT LDA TOS,S SEC SBC NOS,S BVS + BPL NOBRNCH - PLA ; DROP FOR VALUES - PLA - BRA BRNCH ; BMI BRNCH + BMI BRNCH + BMI NOBRNCH - PLA ; DROP FOR VALUES - PLA - BRA BRNCH ; BMI BRNCH + BPL BRNCH DECBRGE PLA DEC PHA @@ -1566,9 +1560,7 @@ _BRGE LDA TOS,S SBC NOS,S BVS + BPL BRNCH - PLA ; DROP FOR VALUES - PLA - BRA NOBRNCH ; BMI NOBRNCH + BMI NOBRNCH INCBRLE PLA INC PHA @@ -1577,13 +1569,9 @@ _BRLE LDA NOS,S SBC TOS,S BVS + BPL BRNCH - PLA ; DROP FOR VALUES - PLA - BRA NOBRNCH ; BMI NOBRNCH + BMI NOBRNCH + BMI BRNCH - PLA ; DROP FOR VALUES - PLA - BRA NOBRNCH ; BMI NOBRNCH + BPL NOBRNCH SUBBRGE LDA NOS,S SEC SBC TOS,S diff --git a/src/vmsrc/apple/plvmjit02.s b/src/vmsrc/apple/plvmjit02.s index 58c0413..3e10cd2 100755 --- a/src/vmsrc/apple/plvmjit02.s +++ b/src/vmsrc/apple/plvmjit02.s @@ -1770,20 +1770,16 @@ BRGT LDA ESTKL+1,X SBC ESTKH,X BVS + BPL NOBRNCH -- INX ; DROP FOR VALUES - INX - BNE BRNCH ; BMI BRNCH + BMI BRNCH BRLT LDA ESTKL,X CMP ESTKL+1,X LDA ESTKH,X SBC ESTKH+1,X BVS + BPL NOBRNCH - INX ; DROP FOR VALUES - INX - BNE BRNCH ; BMI BRNCH + BMI BRNCH + BMI NOBRNCH - BPL - + BPL BRNCH DECBRGE DEC ESTKL,X LDA ESTKL,X CMP #$FF @@ -1795,9 +1791,7 @@ _BRGE LDA ESTKL,X SBC ESTKH+1,X BVS + BPL BRNCH -- INX ; DROP FOR VALUES - INX - BNE NOBRNCH ; BMI NOBRNCH + BMI NOBRNCH INCBRLE INC ESTKL,X BNE _BRLE INC ESTKH,X @@ -1807,11 +1801,9 @@ _BRLE LDA ESTKL+1,X SBC ESTKH,X BVS + BPL BRNCH - INX ; DROP FOR VALUES - INX - BNE NOBRNCH ; BMI NOBRNCH + BMI NOBRNCH + BMI BRNCH - BPL - + BPL NOBRNCH SUBBRGE LDA ESTKL+1,X SEC SBC ESTKL,X diff --git a/src/vmsrc/c64/plvmc64.s b/src/vmsrc/c64/plvmc64.s index a26ba10..6681817 100644 --- a/src/vmsrc/c64/plvmc64.s +++ b/src/vmsrc/c64/plvmc64.s @@ -1047,20 +1047,16 @@ BRGT LDA ESTKL+1,X SBC ESTKH,X BVS + BPL NOBRNCH -- INX ; DROP FOR VALUES - INX - BNE BRNCH ; BMI BRNCH + BMI BRNCH BRLT LDA ESTKL,X CMP ESTKL+1,X LDA ESTKH,X SBC ESTKH+1,X BVS + BPL NOBRNCH - INX ; DROP FOR VALUES - INX - BNE BRNCH ; BMI BRNCH + BMI BRNCH + BMI NOBRNCH - BPL - + BPL BRNCH DECBRGE DEC ESTKL,X LDA ESTKL,X CMP #$FF @@ -1072,9 +1068,7 @@ _BRGE LDA ESTKL,X SBC ESTKH+1,X BVS + BPL BRNCH -- INX ; DROP FOR VALUES - INX - BNE NOBRNCH ; BMI NOBRNCH + BMI NOBRNCH INCBRLE INC ESTKL,X BNE _BRLE INC ESTKH,X @@ -1084,11 +1078,9 @@ _BRLE LDA ESTKL+1,X SBC ESTKH,X BVS + BPL BRNCH - INX ; DROP FOR VALUES - INX - BNE NOBRNCH ; BMI NOBRNCH + BMI NOBRNCH + BMI BRNCH - BPL - + BPL NOBRNCH SUBBRGE LDA ESTKL+1,X SEC SBC ESTKL,X From d0eb8a589705bc33abb5f64644b6b2fbd821ebf2 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Tue, 17 Apr 2018 11:11:11 -0700 Subject: [PATCH 30/74] update images with FOR/NEXT changes --- PLASMA-BLD2.PO | Bin 143360 -> 143360 bytes PLASMA-DEM2.PO | Bin 143360 -> 143360 bytes PLASMA-SOS2.PO | Bin 143360 -> 143360 bytes PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes src/vmsrc/apple/cmd.pla | 20 -------------------- src/vmsrc/apple/cmdjit.pla | 20 -------------------- 6 files changed, 40 deletions(-) diff --git a/PLASMA-BLD2.PO b/PLASMA-BLD2.PO index 6770ea811f1f1c9345376982245042ab1b1f95e3..e355d85af987811a0a7a0bd7e5c47727799ed160 100644 GIT binary patch delta 16107 zcmb8$3tSY{;=u7U!?3&**aZ<#d5M540^%b=R8+(?giZIVVHtYYRmqEF+h+7w$KFNg zwkBz1roA*%|MKslmR-G>z0=aJWoBksnx^Kfhq?dXnH5C5_y7OjKKDC&=FFTkXU=QR zjNCcjgwFXUbZs}SM+adN@k-{>Gk5UM&^8GRgA?0dQdHlh;K6NT)&yU6JKeaCF{7GmL5TBHMV?r4U7O7R z3{Gxa51FGYN}6v)Cf62oJ7sNe$7Z_hiakeH4FAipoKb^qf#li?qK9~4bek(KxjbQy z(YErTgUg0CUsXFQVnlt{HVKbho-nIbRu%xDngwiM8{}N1p6W)4}}DWJHx9+5A^*JnR4yeFsD{!y(irwtPRfaTFn_=U#q&? z*#^q^(F55pP$$oq+gUQ&9f)|eC1Oe-qRb?OEl8xa#E@K?W=tCEFql9%%>(b3?s<3QVlxKV?vDYfY*=G2b z#`aDSA-s$CalDV6;azkSlR=noLZ@febsjpT z%|NnE?0Ci7A(wWbT#+!eqI`rL-&Y03lh#itVzqMVX}%>B+YAX3mW~)QY;>!H1tfed zFb7?njE?-PgtjsE)(HoY@KD<;7T$2#)NsRPWr!b9K1|Lq7s@WQ60$09o7I}j6Lu=A zC?7s@lpM`QTCJ3X*S0Bq)1Nmy91{Q6nKd`NQfg*aPj~$_#rSVPN_t+eyr#KRtF(19 zI;UMa$>a*Ft!(V5N?Xo|@}WkRY9pCsMyqXV)Yfp>-DHg!Tt2M1L~?d27wyD}4s8-H zxjbRwnDUY_!>(ybs$Iw3#J8=6BMpgtFPSTHMJGAQl#LkDoKmYI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9&OSaq+~(L!G(z!Y*>(m$G;=+1j*NUuD&x?H!hrS{#%-Z;`c==f!A3fg;<>`A(i Date: Tue, 17 Apr 2018 16:15:50 -0700 Subject: [PATCH 31/74] Update memmgr library --- PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes src/libsrc/memmgr.pla | 5 +++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/PLASMA-SYS2.PO b/PLASMA-SYS2.PO index 41ee630103c783a7732222ae40de1954652d3d37..95edd651c823c32dfde424a99d81f7e23b871e82 100755 GIT binary patch delta 1423 zcmZA0YiJZ#6u|Lwx0}iAj!lQP&H7kk(-`Xmu~;fJ6+dN7vgWabT@Xcl&_=MLs0EP} z){EGtg z$IRy71M}bm^K7HvXW1Qbe`S8yKQ(kt4OxFZ#opOPD^FRLT_KM|(hKts{}5SOkSC?0 zx~5qQ{&Jh7NIoi_e0rv>)7$nzw7Q^4B-bJ#`RaX7+xT>wo!>nvA4U_k(dN4No8H`a zV#qDi(^l0TaUFWACvTh1CztK$>Gob~Z9MsAi~N}TS%Nalc5l=Bvb(&$a35#MF6G+T ziBoXDuF_atBH0+7UOabKlsr}Lm7PxdQm)q=u5W6ri8ahz{62k$r#{N`Yfj3dhG;`W z!3W8Waq#V)gD0gl-qf6^YnnO56INU7K83QKs@<@-XU-7b}l8SA`iHPr^^+kRD6^qJ7^{M4`ZsBM`A1FA;( zmd?$zTv8dIu_J8fCnHx>?c3#H@wFm@iOilWYDA^F3|sdYl0IiBeZdetfXn39jd^;M z_%`n0F(y!1Ec#Q_B84vejvEkDbOF=tGuGk9v~jXFm7TL zx0$=g+!*nnc#J31##4caen#+u@n4FsP!tqxq6F^-B^?Py^djQr_!z5EjToA-9$V0Y zo!Ey1NTChwIEv#qh12*Ey{x_Nd@!UhlJwy!1}P4+;Rx{^+{Z)wh3EJO$`V}++mdvt z718q<%dB^tLxXCWvumCz>3DCv%;_6c8!O7gSBJ7gqr=y446HL-CzC(2Yt77LbSYbJ bPK0}v@0j{^Se31sRrpU$`IhQ3d`n*g7@lS& delta 1399 zcmZA0T})GF7{Kx8t+kxCEMgUEOf@J>P?E*q;sw!pF)QP{W9@}m)UbrHiy<+RxM;Mz zW}BLEv5qXqi-p~&6Nq19vk6OBKt5*pN*FT77#csqvS_kwG1;Db|E2{~U)4#yUT)`g+pSx&KY&C0@y-W{GCc_Ihg4U1Q77F6Hyfwp{D5Uus_{vbaTZOk5R@q-R*S>3rU?sW){WbL(Mc z+1LzGu)eOW(vonbGPtyOVoH?!rK~HPt@K4Lui0N-RasnGv3&7q`aW6sC`+$7B3mkg z6%{ETBr(Im_t*{|k*rWvb-1Kz`4qFPmTx_U@|Z;pw)@oB3uoa|`gIZDQ-Qac9ihP!lB?sf)E_K3C2h20QYNPRnbcr6oZSpbKdVQDp zH_TubbI4B+94idbnJC0=yvJ{@)=1YM5PyiHIF6Gz!(6lBjq1-yT5uj; z;~TW&25zDoJs6;2$nfb=;tBkMDQfqOfPO^$1kdn4(%hogV!c~p+3t0E3-LB=$4=}) zkhwBiB!YKQgF4is5g+kT6AOGw+)Vrh@p;Gw_f8@^S@Yt;~> 1) & $7FFF + poolsize = (heapavail >> 1) & $7FFF if MACHID & $30 == $30 poolsize = poolsize + (poolsize >> 1) fin @@ -666,7 +666,7 @@ end // !!! Does this work on Apple ///??? // sysbuf = $0800 // heapallocalign(1024, 8, 0) -initdata = heapmark // Use data at top of heap for initialization +initdata = heapalloc(t_initdata) // Use data on heap for initialization initdata=>volparms.0 = 2 initdata=>volparms.1 = 0 initdata=>volparms:2 = sysbuf @@ -733,5 +733,6 @@ repeat fin until !initdata->filecnt fileio:close(initdata->catref) +heaprelease(initdata) //puts(@swapvol); putln done From 6cf47da936371c28ee0a231a2c8444b85394968d Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Thu, 19 Apr 2018 06:59:39 -0700 Subject: [PATCH 32/74] LZ4 decompressor --- src/makefile | 7 +- src/mkrel | 1 + src/samplesrc/lz4.pla | 161 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 168 insertions(+), 1 deletion(-) create mode 100644 src/samplesrc/lz4.pla diff --git a/src/makefile b/src/makefile index af1fb6f..985ce19 100755 --- a/src/makefile +++ b/src/makefile @@ -36,6 +36,7 @@ SNDSEQ = rel/apple/SNDSEQ\#FE1000 PLAYSEQ = rel/apple/PLAYSEQ\#FE1000 SANITY = rel/SANITY\#FE1000 RPNCALC = rel/RPNCALC\#FE1000 +LZ4DECOMP = rel/LZ4DECOMP\#FE1000 UTHERNET2 = rel/apple/UTHERNET2\#FE1000 UTHERNET = rel/apple/UTHERNET\#FE1000 ETHERIP = rel/ETHERIP\#FE1000 @@ -81,7 +82,7 @@ TXTTYPE = .TXT #SYSTYPE = \#FF2000 #TXTTYPE = \#040000 -apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(PLASMAPLASM) $(CODEOPT) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(SOS) $(ROD) $(SIEVE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(GRAFIX) $(GFXDEMO) $(DGR) $(DGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ) +apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(PLASMAPLASM) $(CODEOPT) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(SOS) $(ROD) $(SIEVE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(GRAFIX) $(GFXDEMO) $(DGR) $(DGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(LZ4DECOMP) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ) -rm vmsrc/plvmzp.inc c64: $(PLVMZP_C64) $(PLASM) $(PLVM) $(PLVMC64) @@ -255,6 +256,10 @@ $(SANITY): samplesrc/sanity.pla $(PLVM02) $(PLASM) ./$(PLASM) -AMOW < samplesrc/sanity.pla > samplesrc/sanity.a acme --setpc 4094 -o $(SANITY) samplesrc/sanity.a +$(LZ4DECOMP): samplesrc/lz4.pla $(PLVM02) $(PLASM) + ./$(PLASM) -AMOW < samplesrc/lz4.pla > samplesrc/lz4.a + acme --setpc 4094 -o $(LZ4DECOMP) samplesrc/lz4.a + $(RPNCALC): samplesrc/rpncalc.pla libsrc/fpu.pla inc/fpu.plh libsrc/fpstr.pla inc/fpstr.plh inc/conio.plh $(PLVM02) $(PLASM) ./$(PLASM) -AMOW < samplesrc/rpncalc.pla > samplesrc/rpncalc.a acme --setpc 4094 -o $(RPNCALC) samplesrc/rpncalc.a diff --git a/src/mkrel b/src/mkrel index 1155e03..8702feb 100755 --- a/src/mkrel +++ b/src/mkrel @@ -47,6 +47,7 @@ rm -rf prodos/demos mkdir prodos/demos cp rel/apple/DGRTEST#FE1000 prodos/demos/DGRTEST.REL cp rel/RPNCALC#FE1000 prodos/demos/RPNCALC.REL +cp rel/LZ4DECOMP#FE1000 prodos/demos/LZ4DECOMP.REL cp rel/ROD#FE1000 prodos/demos/ROD.REL mkdir prodos/demos/rogue diff --git a/src/samplesrc/lz4.pla b/src/samplesrc/lz4.pla new file mode 100644 index 0000000..aebc459 --- /dev/null +++ b/src/samplesrc/lz4.pla @@ -0,0 +1,161 @@ +include "inc/cmdsys.plh" +include "inc/args.plh" +include "inc/fileio.plh" + +struc t_header + word magic[2] + byte FLG + byte BD +end +word arg +byte ref + +def dump(addr, len)#0 + while len + putc(^addr == $0A ?? $0D :: ^addr) + addr++ + len-- + loop +end +def lz4Decomp(seq, seqend)#2 + word buff, data, len, offset, fill + byte token + + buff = heapalloc(heapavail - 256) + data = buff + if not buff + return NULL, 0 + fin + while seq < seqend + //puts("LZ4 sequence @ $"); puth(seq); putln + token = ^seq + seq++ + len = token >> 4 + if len + // + // Literal sequence + // + if len == 15 + while ^seq == 255 + len = len + 255 + seq++ + loop + len = len + ^seq + seq++ + fin + //puts("Literals @ $"); puth(seq); puts(", len $"); puth(len); putln; getc + dump(seq, len) + memcpy(data, seq, len) + data = data + len + seq = seq + len + fin + // + // Match sequence + // + offset = *seq + seq = seq + 2 + len = (token & $0F) + 4 + if len == 19 // $0F + 4 + while ^seq == 255 + len = len + 255 + seq++ + loop + len = len + ^seq + seq++ + fin + //puts("Match offset $"); puth(offset); puts(" @ $"); puth(data - offset); puts(", len $"); puth(len); putln; getc + while len > offset + memcpy(data, data - offset, offset) + dump(data, offset) + data = data + offset + len = len - offset + loop + memcpy(data, data - offset, len) + dump(data, len) + data = data + len + loop + return buff, data - buff +end + +def lz4ReadBlock(flags)#2 + word size[2], block, data, len + + fileio:read(ref, @size, 4) + if size[1] & $7FFF + return NULL, 0 + fin + block = heapalloc(size[0]) + if block + fileio:read(ref, block, size[0]) + else + return NULL, 0 + fin + if size[1] & $8000 + // + // Uncompressed block + // + data = block + //puts("Uncompressed data @ $"); puth(data); putln + else + // + // Decompress block + // + //puts("Compressed block @ $"); puth(block); putln + data, len = lz4Decomp(block, block + size[0]) + //puts("Uncompressed data @ $"); puth(data); putln + if data + memcpy(block, data, len) + data = block + fin + heaprelease(block + len) + fin + if flags & $10 // Block Checksum + fileio:read(ref, @size, 4) + fin + return data, len +end + +def lz4ReadFrame#0 + word data, len + byte header[t_header], opt + + fileio:read(ref, @header, t_header) + if header:magic[1] <> $184D or header:magic[0] <> $2204 + puts("Not LZ4 file.\n") + return + fin + if header.FLG & $C0 <> $40 + puts("Wrong LZ4 version.\n") + return + fin + if header.BD & $70 <> $40 + puts("Not 64K block size.\n") + return + fin + opt = 1 + if header.FLG & $08 // Content Size + opt = opt + 8 + fin + if header.FLG & $01 // Dictionary ID + opt = opt + 4 + fin + fileio:read(ref, heapmark, opt) // Read rest of header and throw away + repeat + data, len = lz4ReadBlock(header.FLG) + until not data + if header.FLG & $04 // Content Checksun + fileio:read(ref, heapmark, 4) + fin +end +arg = argNext(argFirst) +if ^arg + ref = fileio:open(arg) + if ref + lz4ReadFrame + fileio:close(ref) + else + puts("File not found.\n") + fin +fin + +done From 912a4526fe173981417f4b36598cf9069c9b2bf0 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Thu, 19 Apr 2018 13:41:14 -0700 Subject: [PATCH 33/74] LZ4 unpack library and sample lz4cat --- src/inc/lz4.plh | 3 + src/libsrc/lz4.pla | 91 ++++++++++++++++++++++ src/makefile | 15 ++-- src/mkrel | 5 +- src/samplesrc/lz4.pla | 161 --------------------------------------- src/samplesrc/lz4cat.pla | 107 ++++++++++++++++++++++++++ 6 files changed, 215 insertions(+), 167 deletions(-) create mode 100644 src/inc/lz4.plh create mode 100644 src/libsrc/lz4.pla delete mode 100644 src/samplesrc/lz4.pla create mode 100644 src/samplesrc/lz4cat.pla diff --git a/src/inc/lz4.plh b/src/inc/lz4.plh new file mode 100644 index 0000000..502b86e --- /dev/null +++ b/src/inc/lz4.plh @@ -0,0 +1,3 @@ +import lz4 + predef lz4Unpack(seq, seqend, buff, buffend) +end diff --git a/src/libsrc/lz4.pla b/src/libsrc/lz4.pla new file mode 100644 index 0000000..16bf29c --- /dev/null +++ b/src/libsrc/lz4.pla @@ -0,0 +1,91 @@ +include "inc/cmdsys.plh" +asm incs + !SOURCE "vmsrc/plvmzp.inc" +end +// +// Always forward copy memory - important for overlapping match sequences +// +asm bcpy(dst, src, len)#0 + INX + INX + INX + LDA ESTKL-3,X + ORA ESTKH-3,X + BEQ CPYEX + LDA ESTKL-1,X + STA DSTL + LDA ESTKH-1,X + STA DSTH + LDA ESTKL-2,X + STA SRCL + LDA ESTKH-2,X + STA SRCH + LDY ESTKL-3,X + BEQ CPYLP + INC ESTKH-3,X + LDY #$00 +CPYLP LDA (SRC),Y + STA (DST),Y + INY + BNE + + INC DSTH + INC SRCH ++ DEC ESTKL-3,X + BNE CPYLP + DEC ESTKH-3,X + BNE CPYLP +CPYEX RTS +end +// +// Unpack LZ4 sequence into buffer, return unpacked length +// +export def lz4Unpack(seq, seqend, buff, buffend) + word data, len, match, i + byte token + + data = buff + while isult(seq, seqend) + token = ^seq + seq++ + len = token >> 4 + if len + // + // Literal sequence + // + if len == 15 + while ^seq == 255 + len = len + 255 + seq++ + loop + len = len + ^seq + seq++ + fin + if isuge(data + len, buffend); return 0; fin + bcpy(data, seq, len) + data = data + len + seq = seq + len + fin + len = token & $0F + if len or isult(seq, seqend) + // + // Match sequence + // + match = data - *seq + seq = seq + 2 + len = len + 4 + if len == 19 // $0F + 4 + while ^seq == 255 + len = len + 255 + seq++ + loop + len = len + ^seq + seq++ + fin + if isuge(data + len, buffend); return 0; fin + bcpy(data, match, len) + data = data + len + fin + loop + return data - buff +end +done diff --git a/src/makefile b/src/makefile index 985ce19..b48cc6d 100755 --- a/src/makefile +++ b/src/makefile @@ -36,7 +36,8 @@ SNDSEQ = rel/apple/SNDSEQ\#FE1000 PLAYSEQ = rel/apple/PLAYSEQ\#FE1000 SANITY = rel/SANITY\#FE1000 RPNCALC = rel/RPNCALC\#FE1000 -LZ4DECOMP = rel/LZ4DECOMP\#FE1000 +LZ4 = rel/LZ4\#FE1000 +LZ4CAT = rel/LZ4CAT\#FE1000 UTHERNET2 = rel/apple/UTHERNET2\#FE1000 UTHERNET = rel/apple/UTHERNET\#FE1000 ETHERIP = rel/ETHERIP\#FE1000 @@ -82,7 +83,7 @@ TXTTYPE = .TXT #SYSTYPE = \#FF2000 #TXTTYPE = \#040000 -apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(PLASMAPLASM) $(CODEOPT) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(SOS) $(ROD) $(SIEVE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(GRAFIX) $(GFXDEMO) $(DGR) $(DGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(LZ4DECOMP) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ) +apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(PLASMAPLASM) $(CODEOPT) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(SOS) $(ROD) $(SIEVE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(GRAFIX) $(GFXDEMO) $(DGR) $(DGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(LZ4) $(LZ4CAT) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ) -rm vmsrc/plvmzp.inc c64: $(PLVMZP_C64) $(PLASM) $(PLVM) $(PLVMC64) @@ -256,9 +257,13 @@ $(SANITY): samplesrc/sanity.pla $(PLVM02) $(PLASM) ./$(PLASM) -AMOW < samplesrc/sanity.pla > samplesrc/sanity.a acme --setpc 4094 -o $(SANITY) samplesrc/sanity.a -$(LZ4DECOMP): samplesrc/lz4.pla $(PLVM02) $(PLASM) - ./$(PLASM) -AMOW < samplesrc/lz4.pla > samplesrc/lz4.a - acme --setpc 4094 -o $(LZ4DECOMP) samplesrc/lz4.a +$(LZ4): libsrc/lz4.pla $(PLVM02) $(PLASM) + ./$(PLASM) -AMOW < libsrc/lz4.pla > libsrc/lz4.a + acme --setpc 4094 -o $(LZ4) libsrc/lz4.a + +$(LZ4CAT): samplesrc/lz4cat.pla inc/lz4.plh $(PLVM02) $(PLASM) + ./$(PLASM) -AMOW < samplesrc/lz4cat.pla > samplesrc/lz4cat.a + acme --setpc 4094 -o $(LZ4CAT) samplesrc/lz4cat.a $(RPNCALC): samplesrc/rpncalc.pla libsrc/fpu.pla inc/fpu.plh libsrc/fpstr.pla inc/fpstr.plh inc/conio.plh $(PLVM02) $(PLASM) ./$(PLASM) -AMOW < samplesrc/rpncalc.pla > samplesrc/rpncalc.a diff --git a/src/mkrel b/src/mkrel index 8702feb..7b937bb 100755 --- a/src/mkrel +++ b/src/mkrel @@ -33,6 +33,7 @@ cp rel/FPU#FE1000 prodos/sys/FPU.REL cp rel/SANE#FE1000 prodos/sys/SANE.REL cp ../sysfiles/FP6502.CODE#060000 prodos/sys/FP6502.CODE.BIN cp ../sysfiles/ELEMS.CODE#060000 prodos/sys/ELEMS.CODE.BIN +cp rel/LZ4#FE1000 prodos/sys/LZ4.REL rm -rf prodos/sos mkdir prodos/sos @@ -47,7 +48,7 @@ rm -rf prodos/demos mkdir prodos/demos cp rel/apple/DGRTEST#FE1000 prodos/demos/DGRTEST.REL cp rel/RPNCALC#FE1000 prodos/demos/RPNCALC.REL -cp rel/LZ4DECOMP#FE1000 prodos/demos/LZ4DECOMP.REL +cp rel/LZ4CAT#FE1000 prodos/demos/LZ4CAT.REL cp rel/ROD#FE1000 prodos/demos/ROD.REL mkdir prodos/demos/rogue @@ -99,6 +100,7 @@ cp samplesrc/rogue.pla prodos/bld/ROGUE.PLA.TXT cp samplesrc/rogue.map.pla prodos/bld/ROGUE.MAP.PLA.TXT cp samplesrc/rogue.combat.pla prodos/bld/ROGUE.COMBAT.PLA.TXT cp samplesrc/gfxdemo.pla prodos/bld/GFXDEMO.PLA.TXT +cp samplesrc/lz4cat.pla prodos/bld/LZ4CAT.PLA.TXT mkdir prodos/bld/inc cp inc/args.plh prodos/bld/inc/ARGS.PLH.TXT @@ -120,4 +122,5 @@ cp inc/sndseq.plh prodos/bld/inc/SNDSEQ.PLH.TXT cp inc/spiport.plh prodos/bld/inc/SPIPORT.PLH.TXT cp inc/testlib.plh prodos/bld/inc/TESTLIB.PLH.TXT cp inc/grafix.plh prodos/bld/inc/GRAFIX.PLH.TXT +cp inc/lz4.plh prodos/bld/inc/LZ4.PLH.TXT cp vmsrc/apple/plvmzp.inc prodos/bld/inc/PLVMZP.INC.TXT diff --git a/src/samplesrc/lz4.pla b/src/samplesrc/lz4.pla deleted file mode 100644 index aebc459..0000000 --- a/src/samplesrc/lz4.pla +++ /dev/null @@ -1,161 +0,0 @@ -include "inc/cmdsys.plh" -include "inc/args.plh" -include "inc/fileio.plh" - -struc t_header - word magic[2] - byte FLG - byte BD -end -word arg -byte ref - -def dump(addr, len)#0 - while len - putc(^addr == $0A ?? $0D :: ^addr) - addr++ - len-- - loop -end -def lz4Decomp(seq, seqend)#2 - word buff, data, len, offset, fill - byte token - - buff = heapalloc(heapavail - 256) - data = buff - if not buff - return NULL, 0 - fin - while seq < seqend - //puts("LZ4 sequence @ $"); puth(seq); putln - token = ^seq - seq++ - len = token >> 4 - if len - // - // Literal sequence - // - if len == 15 - while ^seq == 255 - len = len + 255 - seq++ - loop - len = len + ^seq - seq++ - fin - //puts("Literals @ $"); puth(seq); puts(", len $"); puth(len); putln; getc - dump(seq, len) - memcpy(data, seq, len) - data = data + len - seq = seq + len - fin - // - // Match sequence - // - offset = *seq - seq = seq + 2 - len = (token & $0F) + 4 - if len == 19 // $0F + 4 - while ^seq == 255 - len = len + 255 - seq++ - loop - len = len + ^seq - seq++ - fin - //puts("Match offset $"); puth(offset); puts(" @ $"); puth(data - offset); puts(", len $"); puth(len); putln; getc - while len > offset - memcpy(data, data - offset, offset) - dump(data, offset) - data = data + offset - len = len - offset - loop - memcpy(data, data - offset, len) - dump(data, len) - data = data + len - loop - return buff, data - buff -end - -def lz4ReadBlock(flags)#2 - word size[2], block, data, len - - fileio:read(ref, @size, 4) - if size[1] & $7FFF - return NULL, 0 - fin - block = heapalloc(size[0]) - if block - fileio:read(ref, block, size[0]) - else - return NULL, 0 - fin - if size[1] & $8000 - // - // Uncompressed block - // - data = block - //puts("Uncompressed data @ $"); puth(data); putln - else - // - // Decompress block - // - //puts("Compressed block @ $"); puth(block); putln - data, len = lz4Decomp(block, block + size[0]) - //puts("Uncompressed data @ $"); puth(data); putln - if data - memcpy(block, data, len) - data = block - fin - heaprelease(block + len) - fin - if flags & $10 // Block Checksum - fileio:read(ref, @size, 4) - fin - return data, len -end - -def lz4ReadFrame#0 - word data, len - byte header[t_header], opt - - fileio:read(ref, @header, t_header) - if header:magic[1] <> $184D or header:magic[0] <> $2204 - puts("Not LZ4 file.\n") - return - fin - if header.FLG & $C0 <> $40 - puts("Wrong LZ4 version.\n") - return - fin - if header.BD & $70 <> $40 - puts("Not 64K block size.\n") - return - fin - opt = 1 - if header.FLG & $08 // Content Size - opt = opt + 8 - fin - if header.FLG & $01 // Dictionary ID - opt = opt + 4 - fin - fileio:read(ref, heapmark, opt) // Read rest of header and throw away - repeat - data, len = lz4ReadBlock(header.FLG) - until not data - if header.FLG & $04 // Content Checksun - fileio:read(ref, heapmark, 4) - fin -end -arg = argNext(argFirst) -if ^arg - ref = fileio:open(arg) - if ref - lz4ReadFrame - fileio:close(ref) - else - puts("File not found.\n") - fin -fin - -done diff --git a/src/samplesrc/lz4cat.pla b/src/samplesrc/lz4cat.pla new file mode 100644 index 0000000..ca5a59a --- /dev/null +++ b/src/samplesrc/lz4cat.pla @@ -0,0 +1,107 @@ +include "inc/cmdsys.plh" +include "inc/args.plh" +include "inc/fileio.plh" +include "inc/lz4.plh" + +struc t_header + word magic[2] + byte FLG + byte BD +end +word arg +byte ref + +def lz4ReadBlock(flags)#2 + word size[2], block, data, len + + len = fileio:read(ref, @size, 4) + if len <> 4 or size[0] == 0 or size[1] & $7FFF + return NULL, 0 + fin + block = heapalloc(size[0]) + if block + len = fileio:read(ref, block, size[0]) + if len <> size[0] + heaprelease(block) + return NULL, 0 + fin + else + return NULL, 0 + fin + if size[1] & $8000 + // + // Uncompressed block + // + data = block + else + // + // Decompress block + // + len = heapavail - 256 // Allocate almost entire heap to decompress into + data = heapalloc(len) + if data + len = lz4Unpack(block, block + size[0], data, data + len) + memcpy(block, data, len) + data = block + else + len = 0 + fin + heaprelease(block + len) + fin + if flags & $10 // Block Checksum + fileio:read(ref, @size, 4) + fin + return data, len +end +def lz4ReadFrame#0 + word data, len + byte header[t_header], opt + + fileio:read(ref, @header, t_header) + if header:magic[1] <> $184D or header:magic[0] <> $2204 + puts("Not LZ4 file.\n") + return + fin + if header.FLG & $C0 <> $40 + puts("Wrong LZ4 version.\n") + return + fin + if header.BD & $70 <> $40 + puts("Not 64K block size.\n") + return + fin + opt = 1 + if header.FLG & $08 // Content Size + opt = opt + 8 + fin + if header.FLG & $01 // Dictionary ID + opt = opt + 4 + fin + fileio:read(ref, heapmark, opt) // Read rest of header and throw away + repeat + data, len = lz4ReadBlock(header.FLG) + if len + while len + putc(^data <> $0A ?? ^data :: $0D) + data++ + len-- + loop + heaprelease(data) + fin + until not data + if header.FLG & $04 // Content Checksun + fileio:read(ref, heapmark, 4) + fin +end +arg = argNext(argFirst) +if ^arg + ref = fileio:open(arg) + if ref + lz4ReadFrame + fileio:close(ref) + else + puts("File not found.\n") + fin +fin + +done From 8d7ed176c5822457593fc5ac96492c159a33e95b Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Thu, 19 Apr 2018 16:35:32 -0700 Subject: [PATCH 34/74] update images --- PLASMA-BLD2.PO | Bin 143360 -> 143360 bytes PLASMA-DEM2.PO | Bin 143360 -> 143360 bytes PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/PLASMA-BLD2.PO b/PLASMA-BLD2.PO index e355d85af987811a0a7a0bd7e5c47727799ed160..c2615165655b48224c57b70707ace889b84e2d7a 100644 GIT binary patch delta 3791 zcmaJ@TW}lI89rydv6PFbiLnzLXwJmB$dN3s9T7YpOd{*z2y{b|1Bv69jl8ziNLsO4 zlSy90Q>W9(w1pj_0>uPFMd^ihaEHfo8K#d6ZMn5To0dDI6lj6AG%5c%yQ`H}5IxA+ zbH4xkuiwAE#tz#Q zPbSRpY4UslVYC+8VTc3k9Z;Z5HExs_{#+~}0WBY~gFS#dlnLKt^76}2mZv#8Y*#uN zG9k?Mg8+-!s>h+BbaHYk>O@ht77{=>~ONJdn~!`Nxn4J(9M=26UL& zYsCK%Z9$Gbc92}EbY*sLA^=zbe?2=#&J;*(Zdd=y|2TPQ6SKc?E)~lV)lSxHsfF>b73v|D3OJa*P(t43a$U(8^pkZ$LuG7vvr~EDg zpRyv&N%N#|%0E>qi@D?OigcToz?W2-^O9pr^Yi*QJPv4qJD&t0bmEmC@Z1ftRm@$) zD`z^_CsH@1Guf$wH{Wsy&OXH}%e~y;Bl`6do!rq|+0Vy+vy<0$`h+U@@|6pV+gz@S zsx0M*I=d)|bCSa1IUy@^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d81f7e23b871e82..ffb640daa481a6c710af7f6275271d3ad56695ab 100755 GIT binary patch delta 1413 zcmbVMOH30{6us~DwVjUDP7yH_qlOkx@PqgXCT@(BTIf&O8bdIm(QzegNVkB&g^3$7 zL|n+qWEPU35e?Cx#$SjDeiFq*+1NE3Z?bAN-JsNA{e0Gpu?&?tnzA6p!B1a zTl!vf1{+Am9deKu4J7R+Rg@<A0Y@x4q zgT_86&k%MA*h_dtaDCP9Q_G1xC~ zCmVQQ5JY~ds{lgtaZ#R#@ySDk6({n?5+ZKv52upcIbJlOBcBnV)-G})QX+Oi#C!}l z_{OSRYz=&m1%*VaLhC?m#6ShHX2f+iOWU?gcb&Yac8U>-Pw(COI^5dX(kaD zvNN-gq%pE+OjsDB@gJ}-K4|NsS|9aUZ0W6Mu)vJW=G=Soec$=cId>MD(qdD(KPL(| z!(Lq#!<~3_KUVhR6LHqe*ZdBj3w`>v3#FRO&f|mOi93f!fPoYZ%;b{==zshyAUp#g zmK=h$&Oul2jUKZmWDP>`WWLV=;OD>rF_)cJ8RU&CaVrh@MexIwF*|R=!jsLy8bp=i zX(gY^b;$hg!Spe4JqzPGyy%1X=$5i(=S(uSh7xoDjt|qv&nR(KgAbByl&q%!6F$Yld#tgx>w--=M8+Byvm#>>E zt7~uGzN;bILgNtz9P1x9K7FR^4jK*gurHf*=4h;g#Fj7fsS>5|+YFUhnF SFY}d~H5{WKyNSjK3;qRz^z&W- From ddd5e28fd4bd26c14dcb159376efd00f4f5964eb Mon Sep 17 00:00:00 2001 From: Dave Schmenk Date: Fri, 20 Apr 2018 09:42:01 -0700 Subject: [PATCH 35/74] Update startup message --- src/libsrc/apple/jit.pla | 1 + src/libsrc/apple/jit16.pla | 2 +- src/vmsrc/apple/cmdjit.pla | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libsrc/apple/jit.pla b/src/libsrc/apple/jit.pla index e22301b..a1d8b84 100644 --- a/src/libsrc/apple/jit.pla +++ b/src/libsrc/apple/jit.pla @@ -47,5 +47,6 @@ fin *jitcomp = @compiler cmdsys.jitcount = 44 cmdsys.jitsize = 96 +puts("JITC enabled") return modkeep done diff --git a/src/libsrc/apple/jit16.pla b/src/libsrc/apple/jit16.pla index ad443d9..a807d30 100644 --- a/src/libsrc/apple/jit16.pla +++ b/src/libsrc/apple/jit16.pla @@ -53,6 +53,6 @@ fin *jitcomp = @compiler cmdsys.jitcount = 44 cmdsys.jitsize = 96 -puts("16 BIT VM/JITC enabled.\n") +puts("16 BIT VM/JITC enabled") return modkeep done diff --git a/src/vmsrc/apple/cmdjit.pla b/src/vmsrc/apple/cmdjit.pla index 32f2ce8..954ba3e 100755 --- a/src/vmsrc/apple/cmdjit.pla +++ b/src/vmsrc/apple/cmdjit.pla @@ -1400,7 +1400,7 @@ heap = *freemem // // Print PLASMA version // -prstr("PLASMA 128K 2.0 Dev\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout +prstr("PLASMA 128K 2.0 Dev ")//; prbyte(version.1); cout('.'); prbyte(version.0); crout // // Init symbol table. // @@ -1429,7 +1429,7 @@ else // // Print some startup info. // - prstr("MEM FREE:$"); prword(availheap); crout + prstr("\nMEM FREE:$"); prword(availheap); crout fin perr = 0 while 1 From 0a1f497d6c1e594688aa0fa29a07add0e93f4830 Mon Sep 17 00:00:00 2001 From: Dave Schmenk Date: Fri, 20 Apr 2018 10:05:53 -0700 Subject: [PATCH 36/74] Smaller startup message --- src/libsrc/apple/jit.pla | 2 +- src/libsrc/apple/jit16.pla | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsrc/apple/jit.pla b/src/libsrc/apple/jit.pla index a1d8b84..6181ad9 100644 --- a/src/libsrc/apple/jit.pla +++ b/src/libsrc/apple/jit.pla @@ -47,6 +47,6 @@ fin *jitcomp = @compiler cmdsys.jitcount = 44 cmdsys.jitsize = 96 -puts("JITC enabled") +puts("JITC") return modkeep done diff --git a/src/libsrc/apple/jit16.pla b/src/libsrc/apple/jit16.pla index a807d30..b4c02ce 100644 --- a/src/libsrc/apple/jit16.pla +++ b/src/libsrc/apple/jit16.pla @@ -53,6 +53,6 @@ fin *jitcomp = @compiler cmdsys.jitcount = 44 cmdsys.jitsize = 96 -puts("16 BIT VM/JITC enabled") +puts("16-bit VM/JITC") return modkeep done From 4db8271a257497938e62a5dc7d0c288fbda0175e Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 21 Apr 2018 16:35:31 -0700 Subject: [PATCH 37/74] TFTP server and fix FOR/NEXT in module init bug --- src/libsrc/apple/jit.pla | 5 - src/libsrc/apple/jit16.pla | 5 - src/libsrc/apple/uthernet.pla | 12 +- src/libsrc/apple/uthernet2.pla | 1 - src/libsrc/etherip.pla | 7 +- src/libsrc/inet.pla | 10 +- src/libsrc/jit16core.pla | 2 +- src/makefile | 7 +- src/mkrel | 1 + src/samplesrc/tftpd.pla | 497 +++++++++++++++++++++++++++++++++ src/toolsrc/codegen.c | 14 +- src/toolsrc/ed.pla | 2 +- src/toolsrc/parse.c | 22 +- src/toolsrc/parse.pla | 16 +- 14 files changed, 548 insertions(+), 53 deletions(-) create mode 100644 src/samplesrc/tftpd.pla diff --git a/src/libsrc/apple/jit.pla b/src/libsrc/apple/jit.pla index 6181ad9..dc4331c 100644 --- a/src/libsrc/apple/jit.pla +++ b/src/libsrc/apple/jit.pla @@ -3,11 +3,6 @@ // include "inc/cmdsys.plh" // -// Module don't free memory -// -const modkeep = $2000 -const modinitkeep = $4000 -// // Indirect interpreter DEFinition entrypoint // struc t_defentry diff --git a/src/libsrc/apple/jit16.pla b/src/libsrc/apple/jit16.pla index b4c02ce..0b61a9f 100644 --- a/src/libsrc/apple/jit16.pla +++ b/src/libsrc/apple/jit16.pla @@ -3,11 +3,6 @@ // include "inc/cmdsys.plh" // -// Module don't free memory -// -const modkeep = $2000 -const modinitkeep = $4000 -// // Indirect interpreter DEFinition entrypoint // struc t_defentry diff --git a/src/libsrc/apple/uthernet.pla b/src/libsrc/apple/uthernet.pla index aa5ba21..9a0c7b8 100644 --- a/src/libsrc/apple/uthernet.pla +++ b/src/libsrc/apple/uthernet.pla @@ -11,10 +11,10 @@ end // // Uthernet register offsets // -const TX_DATA = $00 -const RX_DATA = $00 -const TX_CMD = $04 -const TX_LEN = $06 +const TX_DATA = $00 +const RX_DATA = $00 +const TX_CMD = $04 +const TX_LEN = $06 const INT_STATUS = $08 const PREG_INDEX = $0A const PREG_DATA = $0C @@ -238,9 +238,7 @@ for slot = $90 to $F0 step $10 // // Install etherip driver // - puts("Found Uthernet I in slot #") - putc('0' + ((slot - $80) >> 4)) - putln + puts("Found Uthernet I in slot #"); putc('0' + ((slot - $80) >> 4)); putln setEtherDriver(@utherMAC, @peekfrmlen, @peekfrm, @pokefrmlen, @pokefrm) return modkeep fin diff --git a/src/libsrc/apple/uthernet2.pla b/src/libsrc/apple/uthernet2.pla index 26bc120..2ce036f 100644 --- a/src/libsrc/apple/uthernet2.pla +++ b/src/libsrc/apple/uthernet2.pla @@ -137,7 +137,6 @@ word bcast = IP_BROADCAST, IP_BROADCAST // // ICMP type/codes // -const IP_PROTO_ICMP = 1 const ICMP_ECHO_REQST = 8 const ICMP_ECHO_REPLY = 0 // diff --git a/src/libsrc/etherip.pla b/src/libsrc/etherip.pla index 43c1cde..bd99b3d 100644 --- a/src/libsrc/etherip.pla +++ b/src/libsrc/etherip.pla @@ -52,7 +52,6 @@ const IP_PROTO_TCP = $06 // // ICMP type/codes // -const IP_PROTO_ICMP = 1 const ICMP_ECHO_REQST = 8 const ICMP_ECHO_REPLY = 0 // @@ -101,7 +100,7 @@ const ARP_REQST = $0100 // BE format const ARP_REPLY = $0200 // BE format struc t_arp word arp_hw - word arp_proto + word arp_prot byte arp_hlen byte arp_plen word arp_op @@ -155,8 +154,8 @@ struc t_notify word notify_func word notify_parm end -byte[t_notify * MAX_UDP_NOTIFIES] portsUDP -byte[t_notify * MAX_TCP_NOTIFIES] portsTCP +byte[t_notify] portsUDP[MAX_UDP_NOTIFIES] +byte[t_notify] portsTCP[MAX_TCP_NOTIFIES] // // Service ICMP hook // diff --git a/src/libsrc/inet.pla b/src/libsrc/inet.pla index 246e5e8..1c10cff 100644 --- a/src/libsrc/inet.pla +++ b/src/libsrc/inet.pla @@ -54,12 +54,6 @@ def iNetSetDNS(ipptr) return 0 end -//def putb(hexb) -// return call($FDDA, hexb, 0, 0, 0) -//end -//def puth(hex) -// return call($F941, hex >> 8, hex, 0, 0) -//end //def dumpbytes(buf, len) // word i // @@ -205,11 +199,13 @@ def iNetResolve(namestr, ipaddr) end def iNetInit +word retcode // // Look for net hardware // while ^driver - if cmdsys:modexec(driver) >= 0 + retcode = cmdsys:modexec(driver) + if retcode >= 0 // // Get an IP address // diff --git a/src/libsrc/jit16core.pla b/src/libsrc/jit16core.pla index b3ab4be..e9b4792 100644 --- a/src/libsrc/jit16core.pla +++ b/src/libsrc/jit16core.pla @@ -988,7 +988,7 @@ def compiler(defptr)#0 if not (codeptr->14 & $80) // Unresolved address list addrxlate=>[dest] = codeptr + 13 - *jitcodeptr fin - codeptr = codeptr + 5 + codeptr = codeptr + 15 A_IS_TOS = FALSE break is $A2 // BRLT - FOR/NEXT SPECIFIC TEST & BRANCH diff --git a/src/makefile b/src/makefile index b48cc6d..0343805 100755 --- a/src/makefile +++ b/src/makefile @@ -44,6 +44,7 @@ ETHERIP = rel/ETHERIP\#FE1000 INET = rel/INET\#FE1000 DHCP = rel/DHCP\#FE1000 HTTPD = rel/HTTPD\#FE1000 +TFTPD = rel/TFTPD\#FE1000 DGR = rel/apple/DGR\#FE1000 GRAFIX = rel/apple/GRAFIX\#FE1000 GFXDEMO = rel/apple/GFXDEMO\#FE1000 @@ -83,7 +84,7 @@ TXTTYPE = .TXT #SYSTYPE = \#FF2000 #TXTTYPE = \#040000 -apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(PLASMAPLASM) $(CODEOPT) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(SOS) $(ROD) $(SIEVE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(GRAFIX) $(GFXDEMO) $(DGR) $(DGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(LZ4) $(LZ4CAT) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ) +apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(PLASMAPLASM) $(CODEOPT) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(SOS) $(ROD) $(SIEVE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(TFTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(GRAFIX) $(GFXDEMO) $(DGR) $(DGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(LZ4) $(LZ4CAT) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ) -rm vmsrc/plvmzp.inc c64: $(PLVMZP_C64) $(PLASM) $(PLVM) $(PLVMC64) @@ -285,6 +286,10 @@ $(HTTPD): samplesrc/httpd.pla $(PLVM02) $(PLASM) ./$(PLASM) -AMOW < samplesrc/httpd.pla > samplesrc/httpd.a acme --setpc 4094 -o $(HTTPD) samplesrc/httpd.a +$(TFTPD): samplesrc/tftpd.pla $(PLVM02) $(PLASM) + ./$(PLASM) -AMOW < samplesrc/tftpd.pla > samplesrc/tftpd.a + acme --setpc 4094 -o $(TFTPD) samplesrc/tftpd.a + $(UTHERNET): libsrc/apple/uthernet.pla $(PLVM02) $(PLASM) ./$(PLASM) -AMOW < libsrc/apple/uthernet.pla > libsrc/apple/uthernet.a acme --setpc 4094 -o $(UTHERNET) libsrc/apple/uthernet.a diff --git a/src/mkrel b/src/mkrel index 7b937bb..8a3f67b 100755 --- a/src/mkrel +++ b/src/mkrel @@ -70,6 +70,7 @@ cp rel/apple/GFXDEMO#FE1000 prodos/demos/apple3/GFXDEMO.REL cp samplesrc/APPLE3.PIX#060000 prodos/demos/apple3/APPLE3.PIX.BIN mkdir prodos/demos/net +cp rel/TFTPD#FE1000 prodos/demos/net/TFTPD.REL cp rel/HTTPD#FE1000 prodos/demos/net/HTTPD.REL cp samplesrc/index.html prodos/demos/net/INDEX.HTML.TXT diff --git a/src/samplesrc/tftpd.pla b/src/samplesrc/tftpd.pla new file mode 100644 index 0000000..d539691 --- /dev/null +++ b/src/samplesrc/tftpd.pla @@ -0,0 +1,497 @@ +// +// TFTP Daemon +// +include "inc/cmdsys.plh" +include "inc/inet.plh" +include "inc/fileio.plh" +include "inc/conio.plh" +// +// TFTP values +// +const TFTP_PORT = 69 +const TID_INC = $0010 +const RRQ = $0100 +const WRQ = $0200 +const DATAPKT = $0300 +const ACKPKT = $0400 +const ERRPKT = $0500 +struc t_errPkt + word errOp + word errCode + byte errStr[] + byte errStrNull +end +struc t_ackPkt + word ackOp + word ackBlock +end +struc t_datPkt + word datOp + word datBlock + byte datBytes[] +end +res[t_errPkt] tftpError = $00, $05, $00, $00, $00 +res[t_ackPkt] tftpAck = $00, $04, $00, $00 +// +// Current file operations +// +byte ref, type, , netscii, filename[256] +word aux, block +word buff, TID = $1001 +word portTFTP, portTID +// +// Swap bytes in word +// +asm swab(val) + !SOURCE "vmsrc/plvmzp.inc" + LDA ESTKL,X + LDY ESTKH,X + STA ESTKH,X + STY ESTKL,X + RTS +end +// +// Translate 'in' value to 'out' value +// +asm xlat(in, out, buf, len)#0 + INX + INX + INX + INX + LDA ESTKL-4,X + ORA ESTKH-4,X + BEQ XLATEX + LDA ESTKL-3,X + STA SRCL + LDA ESTKH-3,X + STA SRCH + LDA ESTKL-1,X + LDY ESTKL-4,X + BEQ XLATLP + INC ESTKH-4,X + LDY #$00 +XLATLP CMP (SRC),Y + BNE + + LDA ESTKL-2,X + STA (SRC),Y + LDA ESTKL-1,X ++ INY + BNE + + INC DSTH + INC SRCH ++ DEC ESTKL-4,X + BNE XLATLP + DEC ESTKH-4,X + BNE XLATLP +XLATEX RTS +end +// +// Convert byte to two hex chars +// +def btoh(cptr, b)#0 + byte h + + h = ((b >> 4) & $0F) + '0' + if h > '9' + h = h + 7 + fin + ^cptr = h + cptr++ + h = (b & $0F) + '0' + if h > '9' + h = h + 7 + fin + ^cptr = h +end + +def hexByte(hexChars) + byte lo, hi + + lo = toupper(^(hexChars + 1)) - '0' + if lo > 9 + lo = lo - 7 + fin + hi = toupper(^hexChars) - '0' + if hi > 9 + hi = hi - 7 + fin + return (hi << 4) | lo +end +def hexWord(hexChars) + return (hexByte(hexChars) << 8) | hexByte(hexChars + 2) +end +def mkProName(netName, proName)#3 + byte n, l, ascii, proType + word proAux + + proType = $02 // default to BIN + proAux = $0000 // default to 0 + // + // Check for CiderPress style extension + // + for l = 0 to 255 + if netName->[l] == 0; break; fin + next + ascii = toupper(netName->[l + 1]) == 'N' // Netscii mode + if l > 7 and ^(netName + l - 7) == '#' + proType = hexByte(netName + l - 6) + proAux = hexWord(netName + l - 4) + l = l - 7 + fin + memcpy(proName + 1, netName, l) + ^proName = l + return ascii, proType, proAux +end +def mkNetName(proName, netName) + word l, n + byte fileinfo[t_fileinfo] + + if !fileio:getfileinfo(proName, @fileinfo) + // + // Scan backward looking for dir seperator + // + l = ^proName + for n = l downto 1 + if ^(proName + n) == '/' + break + fin + next + memcpy(netName + 1, proName + 1 + n, l - n) + ^netName = l - n + 7 + // + // Build CiderPress style extension + // + n = netName + ^netName - 6 + ^n = '#' + btoh(n + 1, fileinfo.file_type) + btoh(n + 3, fileinfo.aux_type.1) + btoh(n + 5, fileinfo.aux_type) + else + // + // Error getting info on file + // + puts("Error reading "); puts(proName); putln + return -1 + fin + return 0 +end + +def readUDP(ipsrc, portsrc, data, len, param) + word err + + err = 0 + when *data + is $0500 // Error + err = *data + is $0400 // Ack + if swab(data=>ackBlock) <> block + puts("RRQ: Out-of-sequence block\n") + err = $0800 // Out-of-sequence block + break + fin + if param == 512 // Size of initial read + param = fileio:read(ref, buff+datBytes, 512) + if netscii + xlat($0D, $0A, buff+datBytes, param) + fin + block++ + buff=>datBlock = swab(block) + iNet:sendUDP(portTID, ipsrc, portsrc, buff, t_datPkt + param) + fin + if err + tftpError:errCode = err + iNet:sendUDP(portTID, ipsrc, portsrc, @tftpError, t_errPkt) + fin + if param < 512 or err + // + // All done + // + iNet:closeUDP(portTID) + fileio:close(ref) + ref = 0 + fin + break + otherwise + puts("TFTP: RRQ Unexpected packet opcode: $"); puth(*data); putln + wend + return 0 +end +def writeUDP(ipsrc, portsrc, data, len, param) + word err + + err = 0 + when *data + is $0300 // Data packet + if swab(data=>datBlock) <> block + puts("WRQ: Out-of-sequence block\n") + err = $0800 // Out-of-sequence block + break + fin + len = len - t_datPkt + if netscii + xlat($0A, $0D, buff+datBytes, len) + fin + if fileio:write(ref, data+datBytes, len) <> len + puts("WRQ: File write error\n") + tftpError:errCode = $0300 // Disk full error + break + fin + if not err + tftpAck:ackBlock = swab(block) + block++ + iNet:sendUDP(portTID, ipsrc, portsrc, @tftpAck, t_ackPkt) + else + tftpError:errCode = err + iNet:sendUDP(portTID, ipsrc, portsrc, @tftpError, t_errPkt) + fin + if len < 512 or err + // + // All done + // + iNet:closeUDP(portTID) + fileio:close(ref) + ref = 0 + fin + break + otherwise + puts("WRQ: Unexpected packet opcode: $"); puth(*data); putln + wend + return 0 +end +def servUDP(ipsrc, portsrc, data, len, param) + when *data + is RRQ // Read request + // + // Initiate file read + // + if ref + // + // File already open and active + // + tftpError:errCode = $0300 // Allocation exceeded + iNet:sendUDP(portTFTP, ipsrc, portsrc, @tftpError, t_errPkt) + return 0 + fin + // + // Extract filename + // + netscii, type, aux = mkProName(data + 2, @filename) + ref = fileio:open(@filename) + if not ref + puts("Error opening file: "); puts(@filename) + puts(", Error: "); putb(perr); putln + tftpError:errCode = $0100 // File not found + iNet:sendUDP(portTFTP, ipsrc, portsrc, @tftpError, t_errPkt) + return 0 + fin + puts("Reading file: "); puts(@filename); putln + TID = (TID + TID_INC) | $1000 + block = 1 + buff=>datBlock = swab(block) + len = fileio:read(ref, buff+datBytes, 512) + if netscii + xlat($0D, $0A, buff+datBytes, 512) + fin + portTID = iNet:openUDP(TID, @readUDP, len) + iNet:sendUDP(portTID, ipsrc, portsrc, buff, t_datPkt + len) + break + is WRQ // Write request + // + // Initiate file write + // + if ref + // + // File already open and active + // + tftpError:errCode = $0300 // Allocation exceeded + iNet:sendUDP(portTFTP, ipsrc, portsrc, @tftpError, t_errPkt) + return 0 + fin + // + // Extract filename + // + netscii, type, aux = mkProName(data + 2, @filename) + fileio:destroy(@filename) + if fileio:create(@filename, type, aux) + puts("Create file error: "); putb(perr); putln + fin + ref = fileio:open(@filename) + if not ref + puts("Error opening file: "); puts(@filename) + puts(", Error: "); putb(perr); putln + tftpError:errCode = $0200 // Access violation + iNet:sendUDP(portTFTP, ipsrc, portsrc, @tftpError, t_errPkt) + return 0 + fin + puts("Writing file: "); puts(@filename); putln + TID = (TID + TID_INC) | $1000 + block = 1 + tftpAck:ackBlock = 0 + portTID = iNet:openUDP(TID, @writeUDP, 0) + iNet:sendUDP(portTID, ipsrc, portsrc, @tftpAck, t_ackPkt) + break + otherwise + puts("TFTP: Server Unexpected packet opcode: $"); puth(*data); putln + wend + return 0 +end + +if !iNet:initIP() + return -1 +fin +puts("TFTP Daemon Version 0.1\n") +portTFTP = iNet:openUDP(TFTP_PORT, @servUDP, 0) +// +// Alloc aligned file/io buffers +// +buff = heapalloc(t_datPkt + 512) +buff=>datOp = $0300 // Data op +// +// Service IP +// +repeat + iNet:serviceIP() +until conio:keypressed() +done + +Experpts from: RFC 1350, TFTP Revision 2, July 1992 + +TFTP Formats + + Type Op # Format without header + + 2 bytes string 1 byte string 1 byte + ----------------------------------------------- + RRQ/ | 01/02 | Filename | 0 | Mode | 0 | + WRQ ----------------------------------------------- + 2 bytes 2 bytes n bytes + --------------------------------- + DATA | 03 | Block # | Data | + --------------------------------- + 2 bytes 2 bytes + ------------------- + ACK | 04 | Block # | + -------------------- + 2 bytes 2 bytes string 1 byte + ---------------------------------------- + ERROR | 05 | ErrorCode | ErrMsg | 0 | + ---------------------------------------- + +Initial Connection Protocol for reading a file + + 1. Host A sends a "RRQ" to host B with source= A's TID, + destination= 69. + + 2. Host B sends a "DATA" (with block number= 1) to host A with + source= B's TID, destination= A's TID. + +Error Codes + + Value Meaning + + 0 Not defined, see error message (if any). + 1 File not found. + 2 Access violation. + 3 Disk full or allocation exceeded. + 4 Illegal TFTP operation. + 5 Unknown transfer ID. + 6 File already exists. + 7 No such user. + +Internet User Datagram Header [2] + + (This has been included only for convenience. TFTP need not be + implemented on top of the Internet User Datagram Protocol.) + + Format + + 0 1 2 3 + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Source Port | Destination Port | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Length | Checksum | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + + Values of Fields + + + Source Port Picked by originator of packet. + + Dest. Port Picked by destination machine (69 for RRQ or WRQ). + + Length Number of bytes in UDP packet, including UDP header. + + Checksum Reference 2 describes rules for computing checksum. + (The implementor of this should be sure that the + correct algorithm is used here.) + Field contains zero if unused. + + Note: TFTP passes transfer identifiers (TID's) to the Internet User + Datagram protocol to be used as the source and destination ports. + + + A transfer is established by sending a request (WRQ to write onto a + foreign file system, or RRQ to read from it), and receiving a + positive reply, an acknowledgment packet for write, or the first data + packet for read. In general an acknowledgment packet will contain + the block number of the data packet being acknowledged. Each data + packet has associated with it a block number; block numbers are + consecutive and begin with one. Since the positive response to a + write request is an acknowledgment packet, in this special case the + block number will be zero. (Normally, since an acknowledgment packet + is acknowledging a data packet, the acknowledgment packet will + contain the block number of the data packet being acknowledged.) If + the reply is an error packet, then the request has been denied. + + In order to create a connection, each end of the connection chooses a + TID for itself, to be used for the duration of that connection. The + TID's chosen for a connection should be randomly chosen, so that the + probability that the same number is chosen twice in immediate + succession is very low. Every packet has associated with it the two + TID's of the ends of the connection, the source TID and the + destination TID. These TID's are handed to the supporting UDP (or + other datagram protocol) as the source and destination ports. A + requesting host chooses its source TID as described above, and sends + its initial request to the known TID 69 decimal (105 octal) on the + serving host. The response to the request, under normal operation, + uses a TID chosen by the server as its source TID and the TID chosen + for the previous message by the requestor as its destination TID. + The two chosen TID's are then used for the remainder of the transfer. + + As an example, the following shows the steps used to establish a + connection to write a file. Note that WRQ, ACK, and DATA are the + names of the write request, acknowledgment, and data types of packets + respectively. The appendix contains a similar example for reading a + file. + + 1. Host A sends a "WRQ" to host B with source= A's TID, + destination= 69. + + 2. Host B sends a "ACK" (with block number= 0) to host A with + source= B's TID, destination= A's TID. + + At this point the connection has been established and the first data + packet can be sent by Host A with a sequence number of 1. In the + next step, and in all succeeding steps, the hosts should make sure + that the source TID matches the value that was agreed on in steps 1 + and 2. If a source TID does not match, the packet should be + discarded as erroneously sent from somewhere else. An error packet + should be sent to the source of the incorrect packet, while not + disturbing the transfer. This can be done only if the TFTP in fact + receives a packet with an incorrect TID. If the supporting protocols + do not allow it, this particular error condition will not arise. + + The following example demonstrates a correct operation of the + protocol in which the above situation can occur. Host A sends a + request to host B. Somewhere in the network, the request packet is + duplicated, and as a result two acknowledgments are returned to host + A, with different TID's chosen on host B in response to the two + requests. When the first response arrives, host A continues the + connection. When the second response to the request arrives, it + should be rejected, but there is no reason to terminate the first + connection. Therefore, if different TID's are chosen for the two + connections on host B and host A checks the source TID's of the + messages it receives, the first connection can be maintained while + the second is rejected by returning an error packet. diff --git a/src/toolsrc/codegen.c b/src/toolsrc/codegen.c index 9f5efba..b5fcb46 100755 --- a/src/toolsrc/codegen.c +++ b/src/toolsrc/codegen.c @@ -89,6 +89,16 @@ int idconst_add(char *name, int len, int value) printf("Constant count overflow\n"); return (0); } + if (idconst_lookup(name, len) > 0) + { + parse_error("const/global name conflict\n"); + return (0); + } + if (idglobal_lookup(name, len) > 0) + { + parse_error("global label already defined\n"); + return (0); + } name[len] = '\0'; emit_idconst(name, value); name[len] = c; @@ -865,7 +875,7 @@ void emit_select(int tag) void emit_caseblock(int casecnt, int *caseof, int *casetag) { int i; - + if (casecnt < 1 || casecnt > 256) parse_error("Switch count under/overflow\n"); emit_pending_seq(); @@ -1372,7 +1382,7 @@ int crunch_seq(t_opseq **seq, int pass) case BINARY_CODE(LE_TOKEN): op->val = op->val <= opnext->val ? 1 : 0; freeops = 2; - break; + break; } // End of collapse constant operation if ((pass > 0) && (freeops == 0) && (op->val != 0)) diff --git a/src/toolsrc/ed.pla b/src/toolsrc/ed.pla index 79c0214..22c9884 100755 --- a/src/toolsrc/ed.pla +++ b/src/toolsrc/ed.pla @@ -17,7 +17,7 @@ const pushbttn2 = $C062 const pushbttn3 = $C063 const keyboard = $C000 const keystrobe = $C010 -const cmdline = $01FF +const inputln = $01FF // // ASCII key values // diff --git a/src/toolsrc/parse.c b/src/toolsrc/parse.c index 7e3c821..d4eac2b 100755 --- a/src/toolsrc/parse.c +++ b/src/toolsrc/parse.c @@ -1119,19 +1119,19 @@ int parse_stmnt(void) parse_error("CONTINUE without loop"); break; case RETURN_TOKEN: + cfnvals = stack_loop; + while (cfnvals >= 2) + { + emit_drop2(); + cfnvals -= 2; + } + if (cfnvals) + { + emit_drop(); + cfnvals--; + } if (infunc) { - int i; - - i = stack_loop; - while (i >= 2) - { - emit_drop2(); - i -= 2; - } - if (i) - emit_drop(); - cfnvals = 0; emit_seq(parse_list(NULL, &cfnvals)); if (cfnvals > infuncvals) parse_error("Too many return values"); diff --git a/src/toolsrc/parse.pla b/src/toolsrc/parse.pla index c95f8be..fb0d73b 100644 --- a/src/toolsrc/parse.pla +++ b/src/toolsrc/parse.pla @@ -872,15 +872,15 @@ def parse_stmnt fin break is RETURN_TKN + i = stack_loop + while i >= 2 + emit_code(DROP2_CODE) + i = i - 2 + loop + if i + emit_code(DROP_CODE) + fin if infunc - i = stack_loop - while i >= 2 - emit_code(DROP2_CODE) - i = i - 2 - loop - if i - emit_code(DROP_CODE) - fin seq, cfnvals = parse_list emit_seq(seq) if cfnvals > infuncvals From a9607e74762959b40076f6d01851950c490e5380 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 21 Apr 2018 17:37:27 -0700 Subject: [PATCH 38/74] update images --- PLASMA-BLD2.PO | Bin 143360 -> 143360 bytes PLASMA-DEM2.PO | Bin 143360 -> 143360 bytes PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/PLASMA-BLD2.PO b/PLASMA-BLD2.PO index c2615165655b48224c57b70707ace889b84e2d7a..a4a3dc4f6d75ec1b6788a9849db44dca1d653bd0 100644 GIT binary patch delta 1159 zcmZvb&q@MO6vof!^s-b*L?7l357C zTNr`)Kpcs01PZ9q4oK@v8FJG3$cZgBACH;aR8^+tirc80-C z4u0Z^`MR`WT@oMDP3k4>PdktjZ)M_EZ5d3IEmPYwm|%&@!5R|Z`Kr&S|3@hUa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*rz!fjfSky2xM7-df>4V<`k=7 z=2?v{Vx^6KUr$E9Eas3jMA`n@ZrvfPAo__IfFp;17<7Ux^t29ccRhG~4=9B^ ck92V4c(c%fhp-G2kOU7Umh3~u@WhGx4;4h3wg3PC From 881c017ac742d59990bc3448c60c7c5b25751ebb Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 21 Apr 2018 17:54:29 -0700 Subject: [PATCH 39/74] update images --- PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/PLASMA-SYS2.PO b/PLASMA-SYS2.PO index 249a9ac7b4077d55a4d2a1b02bf4fef7982b236c..1f338f2bfdd76698507627c4827cadb4d726144e 100755 GIT binary patch delta 1846 zcmZuxZA@EL7=GW=+uKq~xrMG}PRAYnfFWR8k>QX1ApL+6S~}VivN+xRL{v19X(UmG z*?y=HGq2m-OtxfKbALcGH>zzGmtbP1i3u})Y{q5Dz?rx#L56c#w&}&w-j>$Zo4h$s z&UxOC^S;ly`xf>47WJo`j7|qE)S+EyVfeN~jtVmYmoM!1csn8gv1Ty9W)7wuCZip$ z0;keig>i=0skliv!SGB53+I@v=n_`ekA6&AwbxmJBU?}>OzxRTa^wk=Ohhu{#~i`A zntBudoaFgMoU>zgD~XPiM&yN4?zgm?pslhh>GdoSshvpMvgcB#Q3|LiI4B)c!yIRf zcvaBO@DrPWfWFbvHP9W)-+->lARv4Lkf||qi7ZHf)7Kvf^%r=`5NN@sE2Y`}-2(*@ zjkb%@++{R}zsDzhGGp0RlBFTwFZKrIS*U?AzBEg-urgy?_szCB0gZupPhcPv%?D84 zp#!_9FZFc_+h=VPC3#)JP+y?vdWt~H4waStU@+S8h}+xd>-PsTY1kvQJZM-?k*mZR zjK<MicpJGpllv>c_|x@hC0%&#Z=#POD>_(@S5d=&W8k zr=qV}X+cHj8>Ceg{mILNa?%r@g3YV$#fig|kiYx!)>x@wcBqxH$>$N0hU zLz!^mqe&dXHt~Zbj?&+&LH>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D{R$pIuk?z71M)lR8}b3E|066lZp#AUMe^&nVwv!DH143hLii`-C$3kb z{1@fEg&Y@#PW{W1y(JnV2lwXQ_l@>vXboveo3Q{MF4{6B1=(AOgiH;%v3yNhtcQBULbqf4&u^`OD!&Ezo43`U|9AaV!^?g From be9465cd025652d75917d187fbf02b1d1490cbf8 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 21 Apr 2018 19:05:37 -0700 Subject: [PATCH 40/74] Try different fixes --- src/libsrc/apple/uthernet.pla | 29 +++++++++++++++-------------- src/libsrc/inet.pla | 4 +--- src/samplesrc/tftpd.pla | 2 +- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/libsrc/apple/uthernet.pla b/src/libsrc/apple/uthernet.pla index 9a0c7b8..f16d447 100644 --- a/src/libsrc/apple/uthernet.pla +++ b/src/libsrc/apple/uthernet.pla @@ -42,7 +42,7 @@ end // // Uthernet I/O functions // -asm _pokeiow(val) +asm _pokeiow(val)#0 LDA ESTKL,X end asm _pokeiowl @@ -51,13 +51,14 @@ asm _pokeiowl end asm _pokeiowh STA $C000 + INX RTS end // // PEEK BYTE FROM I/O SPACE // _peekio() // -asm _peekio +asm _peekio#1 DEX end asm _peekiol @@ -71,7 +72,7 @@ end // PEEK WORD FROM I/O SPACE // _peekiow() // -asm _peekiow +asm _peekiow#1 DEX end asm _peekiowl @@ -87,7 +88,7 @@ end // WRITE FRAME DATA INTO I/O SPACE // pokefrm(BUF, LEN) // -asm pokefrm(buf, len) +asm pokefrm(buf, len)#1 LDY #$00 LDA ESTKL+1,X STA SRCL @@ -126,7 +127,7 @@ end // READ FRAME DATA FROM I/O SPACE // peekfrm(BUF, LEN) // -asm peekfrm(buf, len) +asm peekfrm(buf, len)#1 LDY #$00 LDA ESTKL+1,X STA DSTL @@ -161,32 +162,32 @@ asm _peekfrmh EXPSW INX RTS end -def pokeiow(io, data) +def pokeiow(io, data)#0 _pokeiowl.1 = io _pokeiowh.1 = io+1 - return _pokeiow(data) + _pokeiow(data) end -def peekio(io) +def peekio(io)#1 _peekiol.1 = io return _peekio() end -def peekiow(io) +def peekiow(io)#1 _peekiowl.1 = io _peekiowh.1 = io+1 return _peekiow() end -def pokepreg(reg, data) +def pokepreg(reg, data)#0 pokeiow(pregidx, reg) - return pokeiow(pregdata, data) + pokeiow(pregdata, data) end -def peekpreg(reg) +def peekpreg(reg)#1 pokeiow(pregidx, reg) return peekiow(pregdata) end // // Set the length of the next packet to send and wait for data space availability // -def pokefrmlen(len) +def pokefrmlen(len)#1 pokeiow(txcmd, $C0) pokeiow(txlen, len) repeat; until peekpreg($0138) & $0100 @@ -195,7 +196,7 @@ end // // Return the length of awaiting packet, 0 otherwise // -def peekfrmlen +def peekfrmlen#1 word len len = 0 if peekiow(isq) & $3F == $04 diff --git a/src/libsrc/inet.pla b/src/libsrc/inet.pla index 1c10cff..9289351 100644 --- a/src/libsrc/inet.pla +++ b/src/libsrc/inet.pla @@ -199,13 +199,11 @@ def iNetResolve(namestr, ipaddr) end def iNetInit -word retcode // // Look for net hardware // while ^driver - retcode = cmdsys:modexec(driver) - if retcode >= 0 + if cmdsys:modexec(driver) >= 0 // // Get an IP address // diff --git a/src/samplesrc/tftpd.pla b/src/samplesrc/tftpd.pla index d539691..d5f7a50 100644 --- a/src/samplesrc/tftpd.pla +++ b/src/samplesrc/tftpd.pla @@ -339,7 +339,7 @@ end if !iNet:initIP() return -1 fin -puts("TFTP Daemon Version 0.1\n") +puts("TFTP Server Version 0.1\n") portTFTP = iNet:openUDP(TFTP_PORT, @servUDP, 0) // // Alloc aligned file/io buffers From 8c0e66daf8218da7cc047235856d8997359bfb0d Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 21 Apr 2018 22:31:59 -0700 Subject: [PATCH 41/74] Update image --- PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes src/libsrc/apple/uthernet.pla | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/PLASMA-SYS2.PO b/PLASMA-SYS2.P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~n~Hg%=M}u*4l)y4d4irHqw3!8+2N|Jjy@cVd`Jehy{)0GgR(Hr zLq=M?r-9_fJiq%KO-zkeap3}`Xb`sl|pJg^4&G{de C%AOJc delta 2078 zcmZY94@jJ490%~<^Z0t6e%!+&w0g==+&z!Wi>XAuwT zdnj*xS!G3WY59ZQ|A4&LLzP)QYyaFsc}lsfynIcW0@K*eixJ!L=N*k$ctd2MBQh|A zKvCH1u=QzoiMz5&UD;dUAClK-E`anD8s)M4TDY!XczomvS4*GARrp=3{*$o?uga>M^Aj$EcL z3kR{DvPEN?I2Afh9=kwFexW%lmprLL^-YL;R%Rzpiclvo4?+{7g@rC#$epxu$HAGS zh^e!}*@TB>&u71LGDTomu7u|~3MYFkS@(^xxpAQdqnBXZNj#J_O%5x|E;4d4pwpWg z%JZh7^-nOKAvYS4PVZr(@xF`S0nT|TB7MS9!BiB*OnjZ=E>R5ATsE1Wia8(Wo zy>-EHCiL2ZJqyF3Ak|+W@yC6;W#yz$WLYT|c&l<8lwOxD1{MR}6yZ#-weG9tb12_XlQ9pr6xB*7ZOgKv$WWi2&0&xC%1=K?q zd=GcP_+BlcCIOzRo1&;IHY!ceh(aEC;2XFGx1(sMK8MZ{m?Y8*p&y1}946r={0s|V Jj~=jd>wlf6=ez&_ diff --git a/src/libsrc/apple/uthernet.pla b/src/libsrc/apple/uthernet.pla index f16d447..58c627e 100644 --- a/src/libsrc/apple/uthernet.pla +++ b/src/libsrc/apple/uthernet.pla @@ -150,7 +150,7 @@ PEEKLP LDA $C000 INY end asm _peekfrmh -+ LDA $C000 + LDA $C000 STA (DST),Y INY BNE + From fb1f08bcc92e5bfd11dcd7b7a886923022dbe0a9 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sun, 22 Apr 2018 14:26:12 -0700 Subject: [PATCH 42/74] Fix UDP header len for UTHERNET --- src/libsrc/apple/uthernet.pla | 160 +++++++++++++++++----------------- src/libsrc/etherip.pla | 2 +- src/tftprel | 39 +++++++++ 3 files changed, 119 insertions(+), 82 deletions(-) create mode 100755 src/tftprel diff --git a/src/libsrc/apple/uthernet.pla b/src/libsrc/apple/uthernet.pla index 58c627e..8345cf6 100644 --- a/src/libsrc/apple/uthernet.pla +++ b/src/libsrc/apple/uthernet.pla @@ -37,130 +37,128 @@ byte[6] utherMAC = $00,$0A,$99,$1E,$02,$A0 // Defines for ASM routines // asm equates - !SOURCE "vmsrc/plvmzp.inc" + !SOURCE "vmsrc/plvmzp.inc" end // // Uthernet I/O functions // asm _pokeiow(val)#0 - LDA ESTKL,X + LDA ESTKL,X end asm _pokeiowl - STA $C000 - LDA ESTKH,X + STA $C000 + LDA ESTKH,X end asm _pokeiowh - STA $C000 - INX - RTS + STA $C000 + INX + RTS end // // PEEK BYTE FROM I/O SPACE // _peekio() // asm _peekio#1 - DEX + DEX end asm _peekiol - LDA $C000 - STA ESTKL,X - LDA #$00 - STA ESTKH,X - RTS + LDA $C000 + STA ESTKL,X + LDA #$00 + STA ESTKH,X + RTS end // // PEEK WORD FROM I/O SPACE // _peekiow() // asm _peekiow#1 - DEX + DEX end asm _peekiowl - LDA $C000 - STA ESTKL,X + LDA $C000 + STA ESTKL,X end asm _peekiowh - LDA $C000 - STA ESTKH,X - RTS + LDA $C000 + STA ESTKH,X + RTS end // // WRITE FRAME DATA INTO I/O SPACE // pokefrm(BUF, LEN) // asm pokefrm(buf, len)#1 - LDY #$00 - LDA ESTKL+1,X - STA SRCL - LDA ESTKH+1,X - STA SRCH - LSR ESTKH,X ; CONVERT BYTE LEN TO WORD LEN - LDA ESTKL,X - ROR - ADC #$00 - STA ESTKL,X - BEQ + - !BYTE $A9 -- CLC - INC ESTKH,X -+ BCS - -POKELP LDA (SRC),Y + LDY #$00 + LDA ESTKL+1,X + STA SRCL + LDA ESTKH+1,X + STA SRCH + LSR ESTKH,X ; CONVERT BYTE LEN TO WORD LEN + LDA ESTKL,X + ROR + ADC #$00 + STA ESTKL,X + BEQ + + INC ESTKH,X ++ BCC POKELP + INC ESTKH,X +POKELP LDA (SRC),Y end asm _pokefrml - STA $C000 - INY - LDA (SRC),Y + STA $C000 + INY + LDA (SRC),Y end asm _pokefrmh - STA $C000 - INY - BNE + - INC SRCH -+ DEC ESTKL,X - BNE POKELP - DEC ESTKH,X - BNE POKELP - INX - RTS + STA $C000 + INY + BNE + + INC SRCH ++ DEC ESTKL,X + BNE POKELP + DEC ESTKH,X + BNE POKELP + INX + RTS end // // READ FRAME DATA FROM I/O SPACE // peekfrm(BUF, LEN) // asm peekfrm(buf, len)#1 - LDY #$00 - LDA ESTKL+1,X - STA DSTL - LDA ESTKH+1,X - STA DSTH - LSR ESTKH,X ; CONVERT BYTE LEN TO WORD LEN - LDA ESTKL,X - ROR - ADC #$00 - STA ESTKL,X - BEQ + - !BYTE $A9 -- CLC - INC ESTKH,X -+ BCS - + LDY #$00 + LDA ESTKL+1,X + STA DSTL + LDA ESTKH+1,X + STA DSTH + LSR ESTKH,X ; CONVERT BYTE LEN TO WORD LEN + LDA ESTKL,X + ROR + ADC #$00 + STA ESTKL,X + BEQ + + INC ESTKH,X ++ BCC PEEKLP + INC ESTKH,X end asm _peekfrml -PEEKLP LDA $C000 - STA (DST),Y - INY +PEEKLP LDA $C000 + STA (DST),Y + INY end asm _peekfrmh - LDA $C000 - STA (DST),Y - INY - BNE + - INC DSTH -+ DEC ESTKL,X - BNE PEEKLP - DEC ESTKH,X - BNE PEEKLP -EXPSW INX - RTS + LDA $C000 + STA (DST),Y + INY + BNE + + INC DSTH ++ DEC ESTKL,X + BNE PEEKLP + DEC ESTKH,X + BNE PEEKLP +EXPSW INX + RTS end def pokeiow(io, data)#0 _pokeiowl.1 = io @@ -232,10 +230,10 @@ for slot = $90 to $F0 step $10 pokepreg($0158, utherMAC:0) // MAC addr pokepreg($015A, utherMAC:2) // MAC addr pokepreg($015C, utherMAC:4) // MAC addr - pokepreg($0102, $0100) // Recv cfg - pokepreg($0104, $0D00) // Recv ctrl - pokepreg($0106, $8200) // Xmit cfg - pokepreg($0112, $00C0) // Line ctrl + pokepreg($0102, $0100) // Recv cfg + pokepreg($0104, $0D00) // Recv ctrl + pokepreg($0106, $8200) // Xmit cfg + pokepreg($0112, $00C0) // Line ctrl // // Install etherip driver // diff --git a/src/libsrc/etherip.pla b/src/libsrc/etherip.pla index bd99b3d..3765486 100644 --- a/src/libsrc/etherip.pla +++ b/src/libsrc/etherip.pla @@ -499,7 +499,7 @@ def etherServiceIP lclport = swab(rxptr=>udp_dst) for i = 1 to MAX_UDP_NOTIFIES if port=>notify_port == lclport - port=>notify_func(@iphdr=>ip_src,swab(rxptr=>udp_src),rxptr+t_udphdr,swab(rxptr=>udp_len),port=>notify_parm) + port=>notify_func(@iphdr=>ip_src,swab(rxptr=>udp_src),rxptr+t_udphdr,swab(rxptr=>udp_len)-t_udphdr,port=>notify_parm) break fin port = port + t_notify diff --git a/src/tftprel b/src/tftprel new file mode 100755 index 0000000..e63d575 --- /dev/null +++ b/src/tftprel @@ -0,0 +1,39 @@ +#!/bin/bash + +# Core VM, CMDSYS, JITC files +echo "PLASMA.SYSTEM"; atftp $1 --put -l rel/apple/PLASMA.SYSTEM#FF2000 -r PLASMA.SYSTEM#FF2000 +echo "PLVM.128"; atftp $1 --put -l rel/apple/PLVM.128#FF2000 -r PLVM.128#FF2000 +echo "PLVM16"; atftp $1 --put -l rel/apple/PLVM16#FF2000 -r PLVM16#FF2000 +echo "CMD"; atftp $1 --put -l rel/apple/CMD#061000 -r CMD#061000 +echo "CMD128"; atftp $1 --put -l rel/apple/CMD128#061000 -r CMD128#061000 +echo "SYS/JIT"; atftp $1 --put -l rel/apple/JIT#FE1000 -r SYS/JIT#FE1000 +echo "SYS/JIT16"; atftp $1 --put -l rel/apple/JIT16#FE1000 -r SYS/JIT16#FE1000 +echo "SYS/JITUNE"; atftp $1 --put -l rel/apple/JITUNE#FE1000 -r SYS/JITUNE#FE1000 + +# Core libraries +echo "SYS/ARGS"; atftp $1 --put -l rel/ARGS#FE1000 -r SYS/ARGS#FE1000 +echo "SYS/DHCP"; atftp $1 --put -l rel/DHCP#FE1000 -r SYS/DHCP#FE1000 +echo "SYS/ED"; atftp $1 --put -l rel/ED#FE1000 -r SYS/ED#FE1000 +echo "SYS/ETHERIP"; atftp $1 --put -l rel/ETHERIP#FE1000 -r SYS/ETHERIP#FE1000 +echo "SYS/FIBER"; atftp $1 --put -l rel/FIBER#FE1000 -r SYS/FIBER#FE1000 +echo "SYS/FPSTR"; atftp $1 --put -l rel/FPSTR#FE1000 -r SYS/FPSTR#FE1000 +echo "SYS/FPU"; atftp $1 --put -l rel/FPU#FE1000 -r SYS/FPU#FE1000 +echo "SYS/INET"; atftp $1 --put -l rel/INET#FE1000 -r SYS/INET#FE1000 +echo "SYS/LONGJUMP"; atftp $1 --put -l rel/LONGJMP#FE1000 -r SYS/LONGJMP#FE1000 +echo "SYS/LZ4"; atftp $1 --put -l rel/LZ4#FE1000 -r SYS/LZ4#FE1000 +echo "SYS/MEMMGR"; atftp $1 --put -l rel/MEMMGR#FE1000 -r SYS/MEMMGR#FE1000 +echo "SYS/SANE"; atftp $1 --put -l rel/SANE#FE1000 -r SYS/SANE#FE1000 +echo "SYS/CONIO"; atftp $1 --put -l rel/apple/CONIO#FE1000 -r SYS/CONIO#FE1000 +echo "SYS/DGR"; atftp $1 --put -l rel/apple/DGR#FE1000 -r SYS/DGR#FE1000 +echo "SYS/FILEIO"; atftp $1 --put -l rel/apple/FILEIO#FE1000 -r SYS/FILEIO#FE1000 +echo "SYS/GRAFIX"; atftp $1 --put -l rel/apple/GRAFIX#FE1000 -r SYS/GRAFIX#FE1000 +echo "SYS/JOYBUZZ"; atftp $1 --put -l rel/apple/JOYBUZZ#FE1000 -r SYS/JOYBUZZ#FE1000 +echo "SYS/MON"; atftp $1 --put -l rel/apple/MON#FE1000 -r SYS/MON#FE1000 +echo "SYS/PORTIO"; atftp $1 --put -l rel/apple/PORTIO#FE1000 -r SYS/PORTIO#FE1000 +echo "SYS/SPIPORT"; atftp $1 --put -l rel/apple/SPIPORT#FE1000 -r SYS/SPIPORT#FE1000 +echo "SYS/UTHERNET2";atftp $1 --put -l rel/apple/UTHERNET2#FE1000 -r SYS/UTHERNET2#FE1000 +echo "SYS/UTHERNET"; atftp $1 --put -l rel/apple/UTHERNET#FE1000 -r SYS/UTHERNET#FE1000 + +# Build tools +echo "BLD/PLASM"; atftp $1 --put -l rel/PLASM#FE1000 -r BLD/PLASM#FE1000 +echo "BLD/CODEOPT"; atftp $1 --put -l rel/CODEOPT#FE1000 -r BLD/CODEOPT#FE1000 From ea542905b7a2f7c2a9a8cabe45c5aebaf735ad88 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Mon, 23 Apr 2018 12:02:58 -0700 Subject: [PATCH 43/74] Better Uthernet card detection --- src/libsrc/apple/uthernet.pla | 58 ++++++++------- src/libsrc/apple/uthernet2.pla | 130 +++++++++++++++++---------------- src/vmsrc/apple/cmd.pla | 16 ++-- src/vmsrc/apple/cmdjit.pla | 18 ++--- src/vmsrc/apple/sossys.pla | 12 +-- 5 files changed, 121 insertions(+), 113 deletions(-) diff --git a/src/libsrc/apple/uthernet.pla b/src/libsrc/apple/uthernet.pla index 8345cf6..3c0b350 100644 --- a/src/libsrc/apple/uthernet.pla +++ b/src/libsrc/apple/uthernet.pla @@ -27,6 +27,7 @@ byte rxdata_lo, rxdata_hi byte txcmd byte txlen byte isq +word rom[] byte pregidx byte pregdata // @@ -213,33 +214,36 @@ end // Identify Uthernet card and initialize // for slot = $90 to $F0 step $10 - if (peekiow(slot+TX_CMD) & $CC3F) == $09 - pokeiow(slot+PREG_INDEX, 0) - if peekiow(slot+PREG_DATA) == $630E - pokepreg($0114, $40) // RESET - rxdata_hi = slot + 1 - txcmd = slot + TX_CMD - txlen = slot + TX_LEN - isq = slot + INT_STATUS - pregidx = slot + PREG_INDEX - pregdata = slot + PREG_DATA - _pokefrml.1 = slot - _pokefrmh.1 = slot+1 - _peekfrml.1 = slot - _peekfrmh.1 = slot+1 - pokepreg($0158, utherMAC:0) // MAC addr - pokepreg($015A, utherMAC:2) // MAC addr - pokepreg($015C, utherMAC:4) // MAC addr - pokepreg($0102, $0100) // Recv cfg - pokepreg($0104, $0D00) // Recv ctrl - pokepreg($0106, $8200) // Xmit cfg - pokepreg($0112, $00C0) // Line ctrl - // - // Install etherip driver - // - puts("Found Uthernet I in slot #"); putc('0' + ((slot - $80) >> 4)); putln - setEtherDriver(@utherMAC, @peekfrmlen, @peekfrm, @pokefrmlen, @pokefrm) - return modkeep + rom = ((slot & $70) << 4) | $C000 + if rom=>$06 <> $3C86 or (slot == $0B or (rom->$05 <> $38 and rom->$07 <> $18)) // Skip slots with signature + if (peekiow(slot+TX_CMD) & $CC3F) == $0009 + pokeiow(slot+PREG_INDEX, 0) + if peekiow(slot+PREG_DATA) == $630E + pokepreg($0114, $40) // RESET + rxdata_hi = slot + 1 + txcmd = slot + TX_CMD + txlen = slot + TX_LEN + isq = slot + INT_STATUS + pregidx = slot + PREG_INDEX + pregdata = slot + PREG_DATA + _pokefrml.1 = slot + _pokefrmh.1 = slot+1 + _peekfrml.1 = slot + _peekfrmh.1 = slot+1 + pokepreg($0158, utherMAC:0) // MAC addr + pokepreg($015A, utherMAC:2) // MAC addr + pokepreg($015C, utherMAC:4) // MAC addr + pokepreg($0102, $0100) // Recv cfg + pokepreg($0104, $0D00) // Recv ctrl + pokepreg($0106, $8200) // Xmit cfg + pokepreg($0112, $00C0) // Line ctrl + // + // Install etherip driver + // + puts("Found Uthernet I in slot #"); putc('0' + ((slot - $80) >> 4)); putln + setEtherDriver(@utherMAC, @peekfrmlen, @peekfrm, @pokefrmlen, @pokefrm) + return modkeep + fin fin fin next diff --git a/src/libsrc/apple/uthernet2.pla b/src/libsrc/apple/uthernet2.pla index 2ce036f..57e4c59 100644 --- a/src/libsrc/apple/uthernet2.pla +++ b/src/libsrc/apple/uthernet2.pla @@ -72,6 +72,7 @@ const WIZ_RXMEM3 = $7800 // Wiznet indirect registers // byte slot +word rom[] word saveidx byte regidx byte regdata @@ -842,71 +843,74 @@ end // Identify Uthernet II card and initialize // for slot = $90 to $F0 step $10 - regdata = peekio(slot) - if (regdata & $E4) == $00 - pokeio(slot, $03) // Try setting auto-increment indirect I/F - if peekio(slot) == $03 - saveidx = peekiow(slot + 1) - peekio(slot + 3) // Dummy read to data register should increment index - if peekiow(slot + 1) == saveidx + 1 - // - // Good chance this is it - // - pokeio(slot, $80) // RESET - regidx = slot + 1 - regdata = slot + 3 - _pokedata.1 = regdata - _peekdata.1 = regdata - pokeio(slot, $03) // Auto-increment indirect I/F + enable ping - // - // The following looks redundant, but it sets up the peek/poke locations - // for peekreg(s)/pokereg(s) - // - pokeiow(regidx, WIZ_MR) - pokeio(regdata, $03) // Auto-increment indirect I/F + enable ping - peekio(regdata) - // - // Initialize common registers - // - pokeregs(WIZ_SHAR, @wizMAC, 6) // MAC addr - pokeregw(WIZ_RTR, 5000) // Timeout period to 500ms - pokereg(WIZ_RMSR, $55) // 2K Rx memory/channel - pokereg(WIZ_TMSR, $55) // 2K Tx memory/channel - // - // Print settings - // - puts("Found Uthernet II in slot #") - putc('0' + ((slot - $80) >> 4)) - putln - // - // Fill channel structure - // - saveidx = @wizChannel - for slot = 0 to 3 - saveidx=>channel_regs = WIZ_SREGS + (WIZ_SSIZE * slot) - saveidx=>channel_txmem = WIZ_TXMEM + (WIZ_TXSIZE * slot) - saveidx=>channel_rxmem = WIZ_RXMEM + (WIZ_RXSIZE * slot) - saveidx = saveidx + t_channel - next - // - // Fill in Net class - // - iNet:serviceIP = @wizServiceIP - iNet:openUDP = @wizOpenUDP - iNet:sendUDP = @wizSendUDP - iNet:closeUDP = @wizCloseUDP - iNet:listenTCP = @wizListenTCP - iNet:connectTCP = @wizConnectTCP - iNet:sendTCP = @wizSendTCP - iNet:closeTCP = @wizCloseTCP - iNet:setInterfaceIP = @setWizIP - iNet:getInterfaceHA = @getWizHA - iNet:setCallback = @wizSetCallback - iNet:setParam = @wizSetParam - return modkeep + rom = ((slot & $70) << 4) | $C000 + if rom=>$06 <> $3C86 or (slot == $0B or (rom->$05 <> $38 and rom->$07 <> $18)) // Skip slots with signature + regdata = peekio(slot) + if (regdata & $E4) == $00 + pokeio(slot, $03) // Try setting auto-increment indirect I/F + if peekio(slot) == $03 + saveidx = peekiow(slot + 1) + peekio(slot + 3) // Dummy read to data register should increment index + if peekiow(slot + 1) == saveidx + 1 + // + // Good chance this is it + // + pokeio(slot, $80) // RESET + regidx = slot + 1 + regdata = slot + 3 + _pokedata.1 = regdata + _peekdata.1 = regdata + pokeio(slot, $03) // Auto-increment indirect I/F + enable ping + // + // The following looks redundant, but it sets up the peek/poke locations + // for peekreg(s)/pokereg(s) + // + pokeiow(regidx, WIZ_MR) + pokeio(regdata, $03) // Auto-increment indirect I/F + enable ping + peekio(regdata) + // + // Initialize common registers + // + pokeregs(WIZ_SHAR, @wizMAC, 6) // MAC addr + pokeregw(WIZ_RTR, 5000) // Timeout period to 500ms + pokereg(WIZ_RMSR, $55) // 2K Rx memory/channel + pokereg(WIZ_TMSR, $55) // 2K Tx memory/channel + // + // Print settings + // + puts("Found Uthernet II in slot #") + putc('0' + ((slot - $80) >> 4)) + putln + // + // Fill channel structure + // + saveidx = @wizChannel + for slot = 0 to 3 + saveidx=>channel_regs = WIZ_SREGS + (WIZ_SSIZE * slot) + saveidx=>channel_txmem = WIZ_TXMEM + (WIZ_TXSIZE * slot) + saveidx=>channel_rxmem = WIZ_RXMEM + (WIZ_RXSIZE * slot) + saveidx = saveidx + t_channel + next + // + // Fill in Net class + // + iNet:serviceIP = @wizServiceIP + iNet:openUDP = @wizOpenUDP + iNet:sendUDP = @wizSendUDP + iNet:closeUDP = @wizCloseUDP + iNet:listenTCP = @wizListenTCP + iNet:connectTCP = @wizConnectTCP + iNet:sendTCP = @wizSendTCP + iNet:closeTCP = @wizCloseTCP + iNet:setInterfaceIP = @setWizIP + iNet:getInterfaceHA = @getWizHA + iNet:setCallback = @wizSetCallback + iNet:setParam = @wizSetParam + return modkeep + fin fin + pokeio(slot, regdata) // Restore register fin - pokeio(slot, regdata) // Restore register fin next // diff --git a/src/vmsrc/apple/cmd.pla b/src/vmsrc/apple/cmd.pla index 84e84fd..39f6036 100755 --- a/src/vmsrc/apple/cmd.pla +++ b/src/vmsrc/apple/cmd.pla @@ -972,7 +972,7 @@ def adddef(addr, deflast)#1 return defentry end def loadmod(mod)#1 - word rdlen, modsize, bytecode, codefix, defofst, defcnt, init, fixup + word rdlen, modsize, bytecode, codefix, defofst, defcnt, init, initcode[], fixup word addr, defaddr, modaddr, modfix, modofst, modend word deftbl, deflast word moddep, rld, esd, sym @@ -1130,23 +1130,23 @@ def loadmod(mod)#1 // // Call init routine if it exists. // - fixup = 0 // This is repurposed for the return code + initcode = 0 if init init = init + defofst - fixup = adddef(init, @deflast)() - if fixup < modinitkeep + initcode = adddef(init, @deflast)() + if initcide < modinitkeep // // Free init routine unless initkeep // releaseheap(init) - if fixup < 0 - perr = -fixup + if initcode < 0 + perr = -initcode fin else - fixup = fixup & ~modinitkeep + initcode = initcode & ~modinitkeep fin fin - return fixup + return initcode end // // Command mode diff --git a/src/vmsrc/apple/cmdjit.pla b/src/vmsrc/apple/cmdjit.pla index 954ba3e..379198c 100755 --- a/src/vmsrc/apple/cmdjit.pla +++ b/src/vmsrc/apple/cmdjit.pla @@ -1025,7 +1025,7 @@ def adddef(isfirst, addr, deflast)#1 return defentry end def loadmod(mod)#1 - word rdlen, modsize, bytecode, codefix, defofst, defcnt, init, fixup + word rdlen, modsize, bytecode, codefix, defofst, defcnt, init, initcode[], fixup word addr, defaddr, modaddr, modfix, modofst, modend word deftbl, deflast word moddep, rld, esd, sym @@ -1187,29 +1187,29 @@ def loadmod(mod)#1 return -perr fin // - // Free up rld+esd (and bytecode on 128K) in main memory. + // Free up rld+esd+bytecode in main memory. // releaseheap(modend) // // Call init routine if it exists. // - fixup = 0 // This is repurposed for the return code + initcode = 0 if init init = init + defofst - fixup = adddef(deffirst, init, @deflast)() - if fixup < modinitkeep + initcode = adddef(deffirst, init, @deflast)() + if initcode < modinitkeep // // Free init routine unless initkeep // xheap = init - if fixup < 0 - perr = -fixup + if initcode < 0 + perr = -initcode fin else - fixup = fixup & ~modinitkeep + initcode = initcode & ~modinitkeep fin fin - return fixup + return initcode end // // Command mode diff --git a/src/vmsrc/apple/sossys.pla b/src/vmsrc/apple/sossys.pla index 98e60cb..c3584b8 100755 --- a/src/vmsrc/apple/sossys.pla +++ b/src/vmsrc/apple/sossys.pla @@ -1047,7 +1047,7 @@ def adddef(isfirst, ext, addr, deflast)#1 return defentry end def loadmod(mod)#1 - word refnum[], deffirst, rdlen, modsize, bytecode, codefix, defofst, defcnt, init, fixup + word refnum[], deffirst, rdlen, modsize, bytecode, codefix, defofst, defcnt, init, initcode[], fixup word addr, defaddr, modaddr, modfix, modofst, modend word deftbl, deflast, codeseg word moddep, rld, esd, sym @@ -1256,14 +1256,14 @@ def loadmod(mod)#1 // // Call init routine if it exists. // - fixup = 0 + initcode = 0 if init - fixup = adddef(deffirst, defext, init + defofst, @deflast)() - if fixup < 0 - perr = -fixup + initcode = adddef(deffirst, defext, init + defofst, @deflast)() + if initcode < 0 + perr = -initcode fin fin - return fixup + return initcode end def execmod(modfile)#1 byte moddci[17] From e6fc45a7983e4c4856ba4de9b03cf026de27c441 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Mon, 23 Apr 2018 13:29:54 -0700 Subject: [PATCH 44/74] Network error messages and code cleanp --- src/libsrc/etherip.pla | 2 ++ src/libsrc/inet.pla | 1 + src/vmsrc/apple/cmd.pla | 4 ++-- src/vmsrc/apple/cmdjit.pla | 2 +- src/vmsrc/apple/sossys.pla | 25 ------------------------- 5 files changed, 6 insertions(+), 28 deletions(-) diff --git a/src/libsrc/etherip.pla b/src/libsrc/etherip.pla index 3765486..ebd1c99 100644 --- a/src/libsrc/etherip.pla +++ b/src/libsrc/etherip.pla @@ -378,12 +378,14 @@ end // Open TCP socket in SERVER mode // def etherListenTCP(lclport, callback, param) + puts("TCP/IP not yet implented for this hardware.\n") return 0 end // // Open TCP socket in CLIENT mode // def etherConnectTCP(remip, remport, lclport, callback, param) + puts("TCP/IP not yet implented for this hardware.\n") return 0 end // diff --git a/src/libsrc/inet.pla b/src/libsrc/inet.pla index 9289351..e30c73c 100644 --- a/src/libsrc/inet.pla +++ b/src/libsrc/inet.pla @@ -213,6 +213,7 @@ def iNetInit fin driver = driver + ^driver + 1 loop + puts("No network adapters found.\n") return NULL end diff --git a/src/vmsrc/apple/cmd.pla b/src/vmsrc/apple/cmd.pla index 39f6036..37bb434 100755 --- a/src/vmsrc/apple/cmd.pla +++ b/src/vmsrc/apple/cmd.pla @@ -1132,9 +1132,9 @@ def loadmod(mod)#1 // initcode = 0 if init - init = init + defofst + init = init + defofst initcode = adddef(init, @deflast)() - if initcide < modinitkeep + if initcode < modinitkeep // // Free init routine unless initkeep // diff --git a/src/vmsrc/apple/cmdjit.pla b/src/vmsrc/apple/cmdjit.pla index 379198c..52eeb25 100755 --- a/src/vmsrc/apple/cmdjit.pla +++ b/src/vmsrc/apple/cmdjit.pla @@ -1195,7 +1195,7 @@ def loadmod(mod)#1 // initcode = 0 if init - init = init + defofst + init = init + defofst initcode = adddef(deffirst, init, @deflast)() if initcode < modinitkeep // diff --git a/src/vmsrc/apple/sossys.pla b/src/vmsrc/apple/sossys.pla index c3584b8..c600a74 100755 --- a/src/vmsrc/apple/sossys.pla +++ b/src/vmsrc/apple/sossys.pla @@ -1190,31 +1190,6 @@ def loadmod(mod)#1 *addr = ^rld & $10 ?? *addr + lookupextern(esd, rld->3) :: lookupdef(fixup + codefix, deftbl) rld = rld + 4 fin - //addr = rld=>1 + modfix - //if uword_isge(addr, modaddr) // Skip fixups to header - // if type & $80 // WORD sized fixup. - // fixup = *addr - // else // BYTE sized fixup. - // fixup = ^addr - // fin - // if ^rld & $10 // EXTERN reference. - // fixup = fixup + lookupextern(esd, rld->3) - // else // INTERN fixup. - // fixup = fixup + modofst - // if uword_isge(fixup, bytecode) - // // - // // Bytecode address - replace with call def directory. - // // - // fixup = lookupdef(fixup + codefix, deftbl) - // fin - // fin - // if type & $80 // WORD sized fixup. - // *addr = fixup - // else // BYTE sized fixup. - // ^addr = fixup - // fin - //fin - //rld = rld + 4 loop // // Run through the External/Entry Symbol Directory. From d3a19cccbfac2f2d2dfc82dee4b9ddfe65c6699b Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Tue, 24 Apr 2018 10:26:48 -0700 Subject: [PATCH 45/74] Remove xheap from 64K cmdsys. Rework init message --- src/vmsrc/apple/cmd.pla | 7 ++----- src/vmsrc/apple/cmdjit.pla | 2 +- src/vmsrc/apple/sossys.pla | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/vmsrc/apple/cmd.pla b/src/vmsrc/apple/cmd.pla index 37bb434..cd7871c 100755 --- a/src/vmsrc/apple/cmd.pla +++ b/src/vmsrc/apple/cmd.pla @@ -121,7 +121,6 @@ word sysmodsym = @exports // word systemflags = 0 word heap -word xheap = $0800 word lastsym = symtbl // // Utility functions @@ -1310,17 +1309,15 @@ def execsys(sysfile)#0 end def execmod(modfile)#1 byte moddci[17] - word saveheap, savexheap, savesym, saveflags + word saveheap, savesym, saveflags perr = 1 if stodci(modfile, @moddci) saveheap = heap - savexheap = xheap savesym = lastsym saveflags = systemflags if loadmod(@moddci) < modkeep lastsym = savesym - xheap = savexheap heap = saveheap fin ^lastsym = 0 @@ -1335,7 +1332,7 @@ heap = *freemem // // Print PLASMA version // -prstr("PLASMA 64K 2.0 Dev\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout +prstr("PLASMA 2.0 Dev 64K \n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout // // Init symbol table. // diff --git a/src/vmsrc/apple/cmdjit.pla b/src/vmsrc/apple/cmdjit.pla index 52eeb25..fbfb51c 100755 --- a/src/vmsrc/apple/cmdjit.pla +++ b/src/vmsrc/apple/cmdjit.pla @@ -1400,7 +1400,7 @@ heap = *freemem // // Print PLASMA version // -prstr("PLASMA 128K 2.0 Dev ")//; prbyte(version.1); cout('.'); prbyte(version.0); crout +prstr("PLASMA 2.0 Dev 128K ")//; prbyte(version.1); cout('.'); prbyte(version.0); crout // // Init symbol table. // diff --git a/src/vmsrc/apple/sossys.pla b/src/vmsrc/apple/sossys.pla index c600a74..22c0af8 100755 --- a/src/vmsrc/apple/sossys.pla +++ b/src/vmsrc/apple/sossys.pla @@ -1287,7 +1287,7 @@ cmdlnptr = @cmdln // Print PLASMA version // init_cons -prstr("PLASMA JITC 2.0 Dev\n")//; putb(version.1); putc('.'); putb(version.0); putln +prstr("PLASMA 2.0 Dev JITC\n")//; putb(version.1); putc('.'); putb(version.0); putln prstr("MEM:$"); prword(availheap); crout // // Exec command line parser From 1299cbc48bc714cff61aa0d95d75d6d035a355e8 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Tue, 24 Apr 2018 18:56:35 -0700 Subject: [PATCH 46/74] Fix UTHERNET autodetect and code cleanup --- src/libsrc/apple/uthernet.pla | 19 +++++----- src/libsrc/apple/uthernet2.pla | 10 +++--- src/libsrc/dhcp.pla | 4 +-- src/libsrc/etherip.pla | 1 - src/libsrc/inet.pla | 7 ++-- src/tftprel | 64 +++++++++++++++++----------------- src/vmsrc/apple/cmd.pla | 2 +- src/vmsrc/apple/cmdjit.pla | 4 +-- src/vmsrc/apple/sossys.pla | 2 +- 9 files changed, 57 insertions(+), 56 deletions(-) diff --git a/src/libsrc/apple/uthernet.pla b/src/libsrc/apple/uthernet.pla index 3c0b350..61ac210 100644 --- a/src/libsrc/apple/uthernet.pla +++ b/src/libsrc/apple/uthernet.pla @@ -22,7 +22,6 @@ const AUTO_INC = $8000 // // Uthernet register addresses // -byte[] slot // Init time only byte rxdata_lo, rxdata_hi byte txcmd byte txlen @@ -30,6 +29,7 @@ byte isq word rom[] byte pregidx byte pregdata +byte[] slot // Init time only // // Uthernet MAC address // @@ -219,17 +219,18 @@ for slot = $90 to $F0 step $10 if (peekiow(slot+TX_CMD) & $CC3F) == $0009 pokeiow(slot+PREG_INDEX, 0) if peekiow(slot+PREG_DATA) == $630E - pokepreg($0114, $40) // RESET - rxdata_hi = slot + 1 + pregidx = slot + PREG_INDEX + pregdata = slot + PREG_DATA + pokepreg($0114, $40) // RESET + rxdata_lo = slot + RX_DATA + rxdata_hi = slot + RX_DATA + 1 txcmd = slot + TX_CMD txlen = slot + TX_LEN isq = slot + INT_STATUS - pregidx = slot + PREG_INDEX - pregdata = slot + PREG_DATA - _pokefrml.1 = slot - _pokefrmh.1 = slot+1 - _peekfrml.1 = slot - _peekfrmh.1 = slot+1 + _pokefrml.1 = slot + TX_DATA + _pokefrmh.1 = slot + TX_DATA + 1 + _peekfrml.1 = slot + RX_DATA + _peekfrmh.1 = slot + RX_DATA + 1 pokepreg($0158, utherMAC:0) // MAC addr pokepreg($015A, utherMAC:2) // MAC addr pokepreg($015C, utherMAC:4) // MAC addr diff --git a/src/libsrc/apple/uthernet2.pla b/src/libsrc/apple/uthernet2.pla index 57e4c59..e18c983 100644 --- a/src/libsrc/apple/uthernet2.pla +++ b/src/libsrc/apple/uthernet2.pla @@ -71,11 +71,11 @@ const WIZ_RXMEM3 = $7800 // // Wiznet indirect registers // -byte slot -word rom[] -word saveidx -byte regidx -byte regdata +word[] rom +word saveidx +byte regidx +byte regdata +byte[] slot // // Wiznet MAC address // diff --git a/src/libsrc/dhcp.pla b/src/libsrc/dhcp.pla index ef3bc25..d982800 100644 --- a/src/libsrc/dhcp.pla +++ b/src/libsrc/dhcp.pla @@ -212,11 +212,11 @@ repeat break fin next - retry = retry + 1 + retry++ until retry > 4 or optsOP.2 == DHCP_ACK iNet:closeUDP(portDHCP) iNet:setInterfaceIP(@localip, @localnet, @localgw) puts("Apple II bound to:\n");putip(@localip);putc('/');putip(@localnet);putln iNet:setDNS(@localdns) -//puts("DNS: ");putip(@localdns);putln +puts("DNS:");putip(@localdns);putln done diff --git a/src/libsrc/etherip.pla b/src/libsrc/etherip.pla index ebd1c99..520aa63 100644 --- a/src/libsrc/etherip.pla +++ b/src/libsrc/etherip.pla @@ -587,7 +587,6 @@ def getEtherHA(ha) if ha; memcpy(ha, @myMAC, MAC_SIZE); fin return MAC_SIZE end - // // Fill in iNet class // diff --git a/src/libsrc/inet.pla b/src/libsrc/inet.pla index e30c73c..37cdb9b 100644 --- a/src/libsrc/inet.pla +++ b/src/libsrc/inet.pla @@ -148,7 +148,7 @@ def recvDNS(remip, remport, pkt, len, ipaddr) resptr = resptr + 8 //dumpbytes(resptr + 2, ^(resptr + 1)) resptr = resptr + 2 + ^(resptr + 1); putln - r = r - 1 + r-- loop fin stateDNS = DNS_ANSWER @@ -197,7 +197,9 @@ def iNetResolve(namestr, ipaddr) fin return ipaddr=>0 <> 0 or ipaddr=>2 <> 0 end - +// +// Initialze network stack +// def iNetInit // // Look for net hardware @@ -216,7 +218,6 @@ def iNetInit puts("No network adapters found.\n") return NULL end - // // Fill iNet class // diff --git a/src/tftprel b/src/tftprel index e63d575..dffe642 100755 --- a/src/tftprel +++ b/src/tftprel @@ -1,39 +1,39 @@ #!/bin/bash # Core VM, CMDSYS, JITC files -echo "PLASMA.SYSTEM"; atftp $1 --put -l rel/apple/PLASMA.SYSTEM#FF2000 -r PLASMA.SYSTEM#FF2000 -echo "PLVM.128"; atftp $1 --put -l rel/apple/PLVM.128#FF2000 -r PLVM.128#FF2000 -echo "PLVM16"; atftp $1 --put -l rel/apple/PLVM16#FF2000 -r PLVM16#FF2000 -echo "CMD"; atftp $1 --put -l rel/apple/CMD#061000 -r CMD#061000 -echo "CMD128"; atftp $1 --put -l rel/apple/CMD128#061000 -r CMD128#061000 -echo "SYS/JIT"; atftp $1 --put -l rel/apple/JIT#FE1000 -r SYS/JIT#FE1000 -echo "SYS/JIT16"; atftp $1 --put -l rel/apple/JIT16#FE1000 -r SYS/JIT16#FE1000 -echo "SYS/JITUNE"; atftp $1 --put -l rel/apple/JITUNE#FE1000 -r SYS/JITUNE#FE1000 +echo "PLASMA.SYSTEM"; atftp $1 --put -l rel/apple/PLASMA.SYSTEM#FF2000 -r $2/PLASMA.SYSTEM#FF2000 +echo "PLVM.128"; atftp $1 --put -l rel/apple/PLVM.128#FF2000 -r $2/PLVM.128#FF2000 +echo "PLVM16"; atftp $1 --put -l rel/apple/PLVM16#FF2000 -r $2/PLVM16#FF2000 +echo "CMD"; atftp $1 --put -l rel/apple/CMD#061000 -r $2/CMD#061000 +echo "CMD128"; atftp $1 --put -l rel/apple/CMD128#061000 -r $2/CMD128#061000 +echo "SYS/JIT"; atftp $1 --put -l rel/apple/JIT#FE1000 -r $2/SYS/JIT#FE1000 +echo "SYS/JIT16"; atftp $1 --put -l rel/apple/JIT16#FE1000 -r $2/SYS/JIT16#FE1000 +echo "SYS/JITUNE"; atftp $1 --put -l rel/apple/JITUNE#FE1000 -r $2/SYS/JITUNE#FE1000 # Core libraries -echo "SYS/ARGS"; atftp $1 --put -l rel/ARGS#FE1000 -r SYS/ARGS#FE1000 -echo "SYS/DHCP"; atftp $1 --put -l rel/DHCP#FE1000 -r SYS/DHCP#FE1000 -echo "SYS/ED"; atftp $1 --put -l rel/ED#FE1000 -r SYS/ED#FE1000 -echo "SYS/ETHERIP"; atftp $1 --put -l rel/ETHERIP#FE1000 -r SYS/ETHERIP#FE1000 -echo "SYS/FIBER"; atftp $1 --put -l rel/FIBER#FE1000 -r SYS/FIBER#FE1000 -echo "SYS/FPSTR"; atftp $1 --put -l rel/FPSTR#FE1000 -r SYS/FPSTR#FE1000 -echo "SYS/FPU"; atftp $1 --put -l rel/FPU#FE1000 -r SYS/FPU#FE1000 -echo "SYS/INET"; atftp $1 --put -l rel/INET#FE1000 -r SYS/INET#FE1000 -echo "SYS/LONGJUMP"; atftp $1 --put -l rel/LONGJMP#FE1000 -r SYS/LONGJMP#FE1000 -echo "SYS/LZ4"; atftp $1 --put -l rel/LZ4#FE1000 -r SYS/LZ4#FE1000 -echo "SYS/MEMMGR"; atftp $1 --put -l rel/MEMMGR#FE1000 -r SYS/MEMMGR#FE1000 -echo "SYS/SANE"; atftp $1 --put -l rel/SANE#FE1000 -r SYS/SANE#FE1000 -echo "SYS/CONIO"; atftp $1 --put -l rel/apple/CONIO#FE1000 -r SYS/CONIO#FE1000 -echo "SYS/DGR"; atftp $1 --put -l rel/apple/DGR#FE1000 -r SYS/DGR#FE1000 -echo "SYS/FILEIO"; atftp $1 --put -l rel/apple/FILEIO#FE1000 -r SYS/FILEIO#FE1000 -echo "SYS/GRAFIX"; atftp $1 --put -l rel/apple/GRAFIX#FE1000 -r SYS/GRAFIX#FE1000 -echo "SYS/JOYBUZZ"; atftp $1 --put -l rel/apple/JOYBUZZ#FE1000 -r SYS/JOYBUZZ#FE1000 -echo "SYS/MON"; atftp $1 --put -l rel/apple/MON#FE1000 -r SYS/MON#FE1000 -echo "SYS/PORTIO"; atftp $1 --put -l rel/apple/PORTIO#FE1000 -r SYS/PORTIO#FE1000 -echo "SYS/SPIPORT"; atftp $1 --put -l rel/apple/SPIPORT#FE1000 -r SYS/SPIPORT#FE1000 -echo "SYS/UTHERNET2";atftp $1 --put -l rel/apple/UTHERNET2#FE1000 -r SYS/UTHERNET2#FE1000 -echo "SYS/UTHERNET"; atftp $1 --put -l rel/apple/UTHERNET#FE1000 -r SYS/UTHERNET#FE1000 +echo "SYS/ARGS"; atftp $1 --put -l rel/ARGS#FE1000 -r $2/SYS/ARGS#FE1000 +echo "SYS/DHCP"; atftp $1 --put -l rel/DHCP#FE1000 -r $2/SYS/DHCP#FE1000 +echo "SYS/ED"; atftp $1 --put -l rel/ED#FE1000 -r $2/SYS/ED#FE1000 +echo "SYS/ETHERIP"; atftp $1 --put -l rel/ETHERIP#FE1000 -r $2/SYS/ETHERIP#FE1000 +echo "SYS/FIBER"; atftp $1 --put -l rel/FIBER#FE1000 -r $2/SYS/FIBER#FE1000 +echo "SYS/FPSTR"; atftp $1 --put -l rel/FPSTR#FE1000 -r $2/SYS/FPSTR#FE1000 +echo "SYS/FPU"; atftp $1 --put -l rel/FPU#FE1000 -r $2/SYS/FPU#FE1000 +echo "SYS/INET"; atftp $1 --put -l rel/INET#FE1000 -r $2/SYS/INET#FE1000 +echo "SYS/LONGJUMP"; atftp $1 --put -l rel/LONGJMP#FE1000 -r $2/SYS/LONGJMP#FE1000 +echo "SYS/LZ4"; atftp $1 --put -l rel/LZ4#FE1000 -r $2/SYS/LZ4#FE1000 +echo "SYS/MEMMGR"; atftp $1 --put -l rel/MEMMGR#FE1000 -r $2/SYS/MEMMGR#FE1000 +echo "SYS/SANE"; atftp $1 --put -l rel/SANE#FE1000 -r $2/SYS/SANE#FE1000 +echo "SYS/CONIO"; atftp $1 --put -l rel/apple/CONIO#FE1000 -r $2/SYS/CONIO#FE1000 +echo "SYS/DGR"; atftp $1 --put -l rel/apple/DGR#FE1000 -r $2/SYS/DGR#FE1000 +echo "SYS/FILEIO"; atftp $1 --put -l rel/apple/FILEIO#FE1000 -r $2/SYS/FILEIO#FE1000 +echo "SYS/GRAFIX"; atftp $1 --put -l rel/apple/GRAFIX#FE1000 -r $2/SYS/GRAFIX#FE1000 +echo "SYS/JOYBUZZ"; atftp $1 --put -l rel/apple/JOYBUZZ#FE1000 -r $2/SYS/JOYBUZZ#FE1000 +echo "SYS/MON"; atftp $1 --put -l rel/apple/MON#FE1000 -r $2/SYS/MON#FE1000 +echo "SYS/PORTIO"; atftp $1 --put -l rel/apple/PORTIO#FE1000 -r $2/SYS/PORTIO#FE1000 +echo "SYS/SPIPORT"; atftp $1 --put -l rel/apple/SPIPORT#FE1000 -r $2/SYS/SPIPORT#FE1000 +echo "SYS/UTHERNET2";atftp $1 --put -l rel/apple/UTHERNET2#FE1000 -r $2/SYS/UTHERNET2#FE1000 +echo "SYS/UTHERNET"; atftp $1 --put -l rel/apple/UTHERNET#FE1000 -r $2/SYS/UTHERNET#FE1000 # Build tools -echo "BLD/PLASM"; atftp $1 --put -l rel/PLASM#FE1000 -r BLD/PLASM#FE1000 -echo "BLD/CODEOPT"; atftp $1 --put -l rel/CODEOPT#FE1000 -r BLD/CODEOPT#FE1000 +echo "BLD/PLASM"; atftp $1 --put -l rel/PLASM#FE1000 -r $2/BLD/PLASM#FE1000 +echo "BLD/CODEOPT"; atftp $1 --put -l rel/CODEOPT#FE1000 -r $2/BLD/CODEOPT#FE1000 diff --git a/src/vmsrc/apple/cmd.pla b/src/vmsrc/apple/cmd.pla index cd7871c..61f450f 100755 --- a/src/vmsrc/apple/cmd.pla +++ b/src/vmsrc/apple/cmd.pla @@ -982,7 +982,7 @@ def loadmod(mod)#1 // dcitos(mod, @filename) refnum = open(@filename) - if !refnum + if !refnum and filename < 16 // // Try system path // diff --git a/src/vmsrc/apple/cmdjit.pla b/src/vmsrc/apple/cmdjit.pla index fbfb51c..8931509 100755 --- a/src/vmsrc/apple/cmdjit.pla +++ b/src/vmsrc/apple/cmdjit.pla @@ -1025,7 +1025,7 @@ def adddef(isfirst, addr, deflast)#1 return defentry end def loadmod(mod)#1 - word rdlen, modsize, bytecode, codefix, defofst, defcnt, init, initcode[], fixup + word rdlen[], bytecode, modsize, codefix, defofst, defcnt, init, initcode[], fixup word addr, defaddr, modaddr, modfix, modofst, modend word deftbl, deflast word moddep, rld, esd, sym @@ -1036,7 +1036,7 @@ def loadmod(mod)#1 // dcitos(mod, @filename) refnum = open(@filename) - if !refnum + if !refnum and filename < 16 // // Try system path // diff --git a/src/vmsrc/apple/sossys.pla b/src/vmsrc/apple/sossys.pla index 22c0af8..de840da 100755 --- a/src/vmsrc/apple/sossys.pla +++ b/src/vmsrc/apple/sossys.pla @@ -1059,7 +1059,7 @@ def loadmod(mod)#1 // dcitos(mod, @filename) refnum = open(@filename) - if !refnum + if !refnum and filename < 16 // // Try system path // From b576ea8b85a54477b73fdfe89a621d4f016987e5 Mon Sep 17 00:00:00 2001 From: Dave Schmenk Date: Tue, 24 Apr 2018 20:42:07 -0700 Subject: [PATCH 47/74] update images --- PLASMA-BLD2.PO | Bin 143360 -> 143360 bytes PLASMA-DEM2.PO | Bin 143360 -> 143360 bytes PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/PLASMA-BLD2.PO b/PLASMA-BLD2.PO index a4a3dc4f6d75ec1b6788a9849db44dca1d653bd0..6f19f1e5b45c36971f02e96bbf042db22612c3dc 100644 GIT binary patch delta 2406 zcmZvcX>e0j6vywmxyehKrY&8dX+g`@B`t*lB36Z_*_xV-Bt;q!*#t#Itb&Nngij3P zFzOhk=qTa?gDYZQZ4q49RNVdGjED$TlnM%p$kG;4&wC+F@}B*WzPa~z|L1>}d)Ibr z*LG`nRViT&p|~wU(uVjIna>r3 zrxO)X)65f;RJ(2Npe-<{%o_1}#SYh61^ovB~Cg zd9Ue(kz|KaZc1WU2B!vR0ByAfY%`LP*%7SEKIN!5?6a&kcT$kBpAf52ly6*O2Ha*} zLXUNmYO>uQmb%6j0=(v8Zup%3d+Q* zBCO|DYxpr##p$vHpjUyfWLTIAa>D7cBpWIIUrC6T9H=me-_l1B_EA+)9q>7QUcY!- zn#3(;z!G%G%;-s}%jMm}qV&Vhsv&CHR229VvHg z7-Dv%8g@HFtr)R>5euiiU|2eFv|Y}|B+HD*wJD-j2FxCDD5Ua=jVLAAoU#JLcI{*Ln+P9!I6kVY%fOzZbL6T-KGQ@yI#a`9t-9|-Wm0O(7GkGSsovXP@kj~R>T1>m<7^6O|=j}EH>R(!(; zoe)-q-B~ERJ=jFM(`9ptcPx<_tHI}Eo9v;-!~z~`;>KRX#$#f|nTcWkCX3q|XblHa za&<&a4s!B36`TEz6olox0p%tss&2G+J!#$un}XO5MbrwruVpYIroMt&J_AP*RfJikMZ7MSyPRJ1DI*Nll9F5*yRj3##gIwYYK>Vyif| zmD`Q03wnV~m^f)NE?&u zv%@!_n-!Wp=Z?8|&YO?hm!Pv5GJ@DdKC}{-`yp1Z(F&THGTL4r0)1Cq1Ip5eAHlsiM6E#iBNWy|a*mEPytw(L zEidz1x4jbG{_1N&-O;I3SaR&S*?bPwy#D4}JKo-jXZj$PZ^(*Fvly?*?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`*m#p4iQ`09wD z01SPp$`GCfYQbILO>hu=3_iyf>I}<`or4@;d9fTEhH!X_)q|bjui$O)A^04e1(R?9 zdJt>_e*!On=w3VyfTJJ_2Nfrn4&bz7*MRH5jo>FZf83sy8@mJYXK8u-z{Afdv9CeC zmc)v|G%yF}kXo%Vb~D011zq3)uoe6Pc`s|TVn-1E9OS2yXv~vNx-LsM#%j_@Y$>=A zM8I04Kb)Qw`vBo-I-I(|PeB*x2HU_6@GRI3{t9q;5jzAv2B*O{06VLg2rR$`a={od z7I-so^eaZ71WW>xK^d3<%0UHyFNxKFgj>=6U|sKJXk!0F#{1x7a1xvb13=KD6~GD{zy&&TKmkZead{300$YZwu0P)qNDgXcg From 6ec3ce3b91da1a9667363c08d0269b15935bb999 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Wed, 25 Apr 2018 11:25:41 -0700 Subject: [PATCH 48/74] Import VM02 mouse driver --- src/libsrc/apple/mouse.pla | 284 +++++++++++++++++++++++++++++++++++++ 1 file changed, 284 insertions(+) create mode 100644 src/libsrc/apple/mouse.pla diff --git a/src/libsrc/apple/mouse.pla b/src/libsrc/apple/mouse.pla new file mode 100644 index 0000000..dd223d8 --- /dev/null +++ b/src/libsrc/apple/mouse.pla @@ -0,0 +1,284 @@ +CHKMOUSE: LDX #$20 ; LOOK FOR MOUSE + LDA #$01 + JSR SCAN_SLOTS + BCS NOMOUSE + PHA ; SAVE SLOT + LDY #$13 + LDA (TMPTR),Y + STA SERVEMOUSE+1 ; FIXUP IRQ HANDLER + STX SERVEMOUSE+2 + LDY #$14 + LDA (TMPTR),Y + STA READMOUSE+1 ; FIXUP IRQ HANDLER + STX READMOUSE+2 + TXA + AND #$07 + STA MOUSE_SLOT + TAY + JSR MOUSE_INIT ; MAKE SURE MOUSE IS OFF, INTS OFF + LDA WARM_INIT + BNE :+ + JSR PUTS + .ASCIIZ "Mouse in slot #" + LDA MOUSE_SLOT + JSR PRBYTE + JSR CROUT +: PLA + TAY + LDA #MOUSE_DRIVER + JSR LOAD_DRIVER + +;* +;* TURN VBL INTS ON AFTER INIT +;* +VBL_INIT: LDA MOUSE_SLOT + BEQ NOVBL + ASL + TAX + LSR + ORA #MOUSECTL_CALLFW + TAY + SEI ; TURN OFF INTERRUPTS + LDA LINK_DEVCTRL,X + STA CALLVBLPROC+1 + LDA LINK_DEVCTRL+1,X + STA CALLVBLPROC+2 + LDA #$08 ; TURN MOUSE OFF, LEAVE VBL ON + LDX #$12 +CALLVBLPROC: JSR $0000 + CLI ; BACK ON + LDA WARM_INIT + BNE NOVBL + JSR PUTSLN + .ASCIIZ "VBlank timer active" +NOVBL: RTS + + +;* +;* MOUSE DEVICE DRIVER +;* +MOUSE_INIT: ORA #$C0 + STA XREGMOUSE1+1 + STA XREGMOUSE2+1 + ASL + ASL + ASL + ASL + STA YREGMOUSE1+1 + STA YREGMOUSE2+1 + LDA #$00 + PHA ; DISABLE ALL MOUSE INTS + LDX #$12 ; FW INDEX FOR SETMOUSE + BNE CALLMOUSEFW +MOUSE_DRIVER: +MOUSE_DRVR_SZ: .WORD MOUSE_DRVR_END - MOUSE_DRVR_START +MOUSE_READ_OFS: .WORD MOUSE_READ - MOUSE_DRVR_START +MOUSE_WRITE_OFS: .WORD MOUSE_WRITE - MOUSE_DRVR_START +MOUSE_CTRL_OFS: .WORD MOUSE_CTRL - MOUSE_DRVR_START +MOUSE_IRQ_OFS: .WORD MOUSE_IRQ - MOUSE_DRVR_START +MOUSE_DRVR_START: +MOUSE_READ: +MOUSE_WRITE: SEC + RTS +MOUSE_X: .WORD $0000 +MOUSE_Y: .WORD $0000 +MOUSE_STATUS: .BYTE $00 +MOUSE_CTRL: PHA + TYA + AND #$F8 ; MASK OFF SLOT # + CMP #MOUSECTL_CALLFW + BNE :+ +CALLMOUSEFW: STX OPADDR +XREGMOUSE2: LDX #$C4 + STX OPADDR+1 + LDY #$00 + LDA (OPADDR),Y ; GET ENTRYPOINT OFFSET + STA OPADDR +YREGMOUSE2: LDY #$40 + PLA + SEI + JMP (OPADDR) ; CALL FIXED UP FUNCTION POINTER +: CMP #MOUSECTL_READMOUSE ; COPY MOUSE STATUS/POSITION INTO EASILY ACCESSIBLE MEMORY + BNE :+ + PLA + TYA + AND #$07 + TAX ; SAVE MOUSE PARAMETERS + ASL + TAY + LDA LINK_DEVREAD,Y + STA TMPTR + LDA LINK_DEVREAD+1,Y + STA TMPTR+1 + SEI + LDY #$02 + LDA $0478,X + STA (TMPTR),Y + PHA + INY + LDA $0578,X + STA (TMPTR),Y + INY + LDA $04F8,X + STA (TMPTR),Y + PHA + INY + LDA $05F8,X + STA (TMPTR),Y + INY + LDA $0778,X + STA (TMPTR),Y + STA TMP + PLA + TAY + PLA + TAX + LDA TMP + RTS +: CMP #MOUSECTL_CLAMPX + BEQ :+ + CMP #MOUSECTL_CLAMPY + BNE :++ +: PLA + STA $04F8 + STX $05F8 + LDA #$00 + STA $0478 + STA $0578 + TYA + LSR + LSR + LSR + AND #$01 + PHA + LDX #$17 ; FW INDEX FOR CLAMPMOUSE + BNE CALLMOUSEFW +SETMOUSE: PHA + LDX #$12 ; FW INDEX FOR SETMOUSE + BNE CALLMOUSEFW +: PLA + TYA + AND #$F8 ; MASK OFF SLOT # + CMP #IOCTL_OPEN + BNE :+ + LDA #THREAD_YIELD + STA LINK_YIELD+1 + LDA #$0F ; TURN MOUSE INTS ON + BNE SETMOUSE +: CMP #IOCTL_CLOSE + BNE :+ + LDA #$08 ; TURN MOUSE OFF + BNE SETMOUSE +: CMP #IOCTL_DEACTIVATE + BNE :+ + LDA #MOUSECTL_NOIRQ +: CMP #MOUSECTL_NOIRQ ; UNINSTALL IRQ HANDLER + BNE :+ + SEI + LDA #SW_TIMER + STA LINK_YIELD+1 + BNE SETMOUSE +: CMP #IOCTL_ID + BEQ :+ + SEC + RTS +: LDA #$20 ; MOUSE ID + CLC + RTS +; +; VBLANK TIMER AND MOUSE IRQ +; +MOUSE_IRQ: STA TMP +SERVEMOUSE: JSR $C400 + BCS VBLEXIT ; NOT MOUSE INT + LDY TMP ; CHECK MOUSE INT CAUSE + LDA $0778,Y + PHA + AND #$08 ; WAS IT VLB? + BEQ MOUSEEXIT ; NOPE, MOVE OR BUTTON +VBLTIC: LDX #$00 + LDA #$11 ; 17 MSEC (2/3 OF THE TIME) + DEC TIMERADJUST + BNE :+ + LDA #$02 + STA TIMERADJUST + LDA #$10 ; 16 MSEC (1/3 OF THE TIME) +: JSR SYSTEM_TIC +MOUSEEXIT: PLA + AND #$86 ; MOUSE MOVE OR BUTTON ACTIVE + BEQ VBLEXIT +XREGMOUSE1: LDX #$C4 +YREGMOUSE1: LDY #$40 +READMOUSE: JSR $C400 ; IIGS REQUIRES THIS HAPPEN IN IRQ + CLC + RTS +VBLEXIT: SEC + RTS +MOUSE_DRVR_END EQU * + +package apple2; +/* + * This class interfaces directly with the mouse device driver. + */ +public class Mouse +{ + static private int slot, mouseSlot, mouseCtrl, ctrlRead, addrXPos, addrYPos; + static public int xPos, yPos, status; + + public static boolean enable() + { + // + // Search for mouse card and disable VBL interrupts + // + for (slot = 1; slot < 8; slot++) + { + int mouse = vm02.call((1 << 19), 0x90 + (slot << 1)); // ID device + if ((mouse & 0x010000FF) == 0x20) // CARRY clear == valid device IOCTL, 0x20 == mouse card ID + { + mouseCtrl = 0x90 + (slot << 1); + mouseSlot = slot << 16; + ctrlRead = mouseSlot | 0x801400; + addrXPos = vm02.peekWord(0x0370 + (slot << 1)) + 2; + addrYPos = addrXPos + 2; + return (vm02.call(mouseSlot | (3 << 19), mouseCtrl) & 0x01000000) == 0; // open port + } + } + slot = 0; + return false; + } + public static void disable() + { + vm02.call(mouseSlot | (4<<19), mouseCtrl); // close port + } + public static void disableIRQ() + { + int vblSlot, vbl; + // + // Search for mouse card and disable/remove interrupts + // + for (vblSlot = 1; vblSlot < 8; vblSlot++) + { + vbl = vm02.call((1 << 19), 0x90 + (vblSlot << 1)); // ID device + if ((vbl & 0x010000FF) == 0x20) // CARRY clear == valid device IOCTL, 0x20 == mouse card ID + { + vm02.call((vblSlot << 16) | (17 << 19), 0x90 + (vblSlot << 1)); // MOUSECTL_UNVBL + break; + } + } + } + public static int slotMask() + { + return (1 << slot); + } + public static void update() + { + status = vm02.call(ctrlRead, mouseCtrl) & 0xFF; // CALL_FW ReadMouse + xPos = vm02.peekWord(addrXPos); + yPos = vm02.peekWord(addrYPos); + } +} From d0d328227ada2e1ff27a813d865302442f9764b4 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Wed, 25 Apr 2018 21:28:05 -0700 Subject: [PATCH 49/74] Mouse updates --- src/libsrc/apple/mouse.pla | 173 +++++++++++++++++++++++++++++++++++++ src/makefile | 7 +- src/mkrel | 1 + 3 files changed, 180 insertions(+), 1 deletion(-) diff --git a/src/libsrc/apple/mouse.pla b/src/libsrc/apple/mouse.pla index dd223d8..742de36 100644 --- a/src/libsrc/apple/mouse.pla +++ b/src/libsrc/apple/mouse.pla @@ -1,3 +1,96 @@ +include "inc/cmdsys.plh" +// +// Mouse driver +// +word rom +byte slot, index +// +// Serve Mouse/VBL IRQ +// +asm servMouse#0 +SLOT = $FA ; TEMPS FOR TESTING +TIMER = $FB + CLD + JSR $C400 + BCS MOUEX ; NOT MOUSE INT + LDY SLOT ; CHECK MOUSE INT CAUSE + LDA $0778,Y ; WAS IT VBL? + AND #$08 + BEQ + ; NOPE, MOVE OR BUTTON + INC TIMER + BNE + + INC TIMER+1 + BNE + + INC TIMER+2 + BNE + + INC TIMER+3 ++ LDA $0778,Y ; MOUSE MOVE OR BUTTON ACTIVE + AND #$86 + BNE + +MOUEX SEC + RTS +end +asm readMouse#0 ++ LDX #$C4 + LDY #$40 + JSR $C400 ; IIGS REQUIRES THIS HAPPEN IN IRQ + CLC + RTS +end +export asm readTimer#2 + PHP + SEI + DEX + DEX + LDA TIMER + STA ESTKL+1,X + LDA TIMER+1 + STA ESTKH+1,X + LDA TIMER+2 + STA ESTKL,X + LDA TIMER+3 + STA ESTKH,X + PLP + RTS +end +export def mouseInit + byte params[4] + + // + // Hook mouse IRQ handler into ProDOS IRQ chain + // + params.0 = 2 + params.1 = 0 + params:2 = @servMouse + syscall($40, @params) + return rom <> 0 +end +// +// Identify Mouse card/slot and initialize +// +for rom = $C100 to $C700 step $0100 + if rom->5 == $38 and rom->7 == $18 and rom->11 == $01 and rom->12 == $20 + // + // Fix-up IRQ routine + // + slot = rom >> 8 + index = slot << 4 + servMouse:2 = rom + readMouse.1 = slot + readMouse.3 = index + readMouse:5 = rom + puts("Found Mouse in slot #"); putc('0' + ((rom >> 8) & $07)); putln + return + fin +next +// +// Not found +// +rom = 0 +done + +What follows is the relevant parts to the mouse driver for VM02 + CHKMOUSE: LDX #$20 ; LOOK FOR MOUSE LDA #$01 JSR SCAN_SLOTS @@ -28,6 +121,44 @@ CHKMOUSE: LDX #$20 ; LOOK FOR MOUSE LDA #MOUSE_DRIVER JSR LOAD_DRIVER +; +; SCAN SLOTS FOR MATCHING CARD ID +; ENTRY: A = START SLOT SCAN +; X = CARD ID +; EXIT: A = SLOT # :: C = 0 +; X = SLOT PAGE +; +SCAN_SLOTS: ORA #$C0 + STA TMPTR+1 + LDA #$00 + STA TMPTR +CHKSIG: LDY #$05 + LDA (TMPTR),Y + CMP #$38 ; LOOK FOR PASCAL COMPAT SIG + BNE :+ + LDY #$07 + LDA (TMPTR),Y + CMP #$18 + BNE :+ + LDY #$0B + LDA (TMPTR),Y + CMP #$01 + BNE :+ + LDY #$0C + TXA ; LOOK FOR MATCHING ID + CMP (TMPTR),Y + BNE :+ + LDA TMPTR+1 + TAX + AND #$07 + CLC + RTS +: INC TMPTR+1 + LDA TMPTR+1 + CMP #$C8 + BCC CHKSIG + SEC + RTS ;* ;* TURN VBL INTS ON AFTER INIT @@ -54,6 +185,48 @@ CALLVBLPROC: JSR $0000 .ASCIIZ "VBlank timer active" NOVBL: RTS + JSR PRODOS + .BYTE $40 ; ALLOC INTERRUPT + .ADDR ALLOCINTPARMS +.IFDEF DEBUG + BCC :+ + JSR PUTSLN + .ASCIIZ "FAILED TO ALLOCATE INTERRUPT" +: +.ENDIF + RTS +ALLOCINTPARMS: .BYTE $02 + .BYTE $00 ; INT NUM + .ADDR IO_INTERRUPT ; INT CODE + +;* +;* I/O INTERRUPT ROUTINE +;* +IO_INTERRUPT: CLD + LDY #$02 ; SLOT #1 * 2 +FNDIRQPROC: LDA LINK_DEVIRQ+1,Y + BEQ NXTIRQPROC + STA CALLIRQPROC+2 + LDA LINK_DEVIRQ,Y + STA CALLIRQPROC+1 + TYA + LSR + PHA +CALLIRQPROC: JSR $0000 + BCS :+ + PLA + TAY + PHA + JSR THREAD_NOTIFYIO +: PLA + ASL + TAY +NXTIRQPROC: INY + INY + CPY #$10 + BCC FNDIRQPROC + CLC + RTS ;* ;* MOUSE DEVICE DRIVER diff --git a/src/makefile b/src/makefile index 0343805..dac88e8 100755 --- a/src/makefile +++ b/src/makefile @@ -38,6 +38,7 @@ SANITY = rel/SANITY\#FE1000 RPNCALC = rel/RPNCALC\#FE1000 LZ4 = rel/LZ4\#FE1000 LZ4CAT = rel/LZ4CAT\#FE1000 +MOUSE = rel/apple/MOUSE\#FE1000 UTHERNET2 = rel/apple/UTHERNET2\#FE1000 UTHERNET = rel/apple/UTHERNET\#FE1000 ETHERIP = rel/ETHERIP\#FE1000 @@ -84,7 +85,7 @@ TXTTYPE = .TXT #SYSTYPE = \#FF2000 #TXTTYPE = \#040000 -apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(PLASMAPLASM) $(CODEOPT) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(SOS) $(ROD) $(SIEVE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(TFTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(GRAFIX) $(GFXDEMO) $(DGR) $(DGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(LZ4) $(LZ4CAT) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ) +apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(PLASMAPLASM) $(CODEOPT) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(SOS) $(ROD) $(SIEVE) $(MOUSE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(TFTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(GRAFIX) $(GFXDEMO) $(DGR) $(DGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(LZ4) $(LZ4CAT) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ) -rm vmsrc/plvmzp.inc c64: $(PLVMZP_C64) $(PLASM) $(PLVM) $(PLVMC64) @@ -290,6 +291,10 @@ $(TFTPD): samplesrc/tftpd.pla $(PLVM02) $(PLASM) ./$(PLASM) -AMOW < samplesrc/tftpd.pla > samplesrc/tftpd.a acme --setpc 4094 -o $(TFTPD) samplesrc/tftpd.a +$(MOUSE): libsrc/apple/mouse.pla $(PLVM02) $(PLASM) + ./$(PLASM) -AMOW < libsrc/apple/mouse.pla > libsrc/apple/mouse.a + acme --setpc 4094 -o $(MOUSE) libsrc/apple/mouse.a + $(UTHERNET): libsrc/apple/uthernet.pla $(PLVM02) $(PLASM) ./$(PLASM) -AMOW < libsrc/apple/uthernet.pla > libsrc/apple/uthernet.a acme --setpc 4094 -o $(UTHERNET) libsrc/apple/uthernet.a diff --git a/src/mkrel b/src/mkrel index 8a3f67b..6c535ab 100755 --- a/src/mkrel +++ b/src/mkrel @@ -18,6 +18,7 @@ cp rel/MEMMGR#FE1000 prodos/sys/MEMMGR.REL cp rel/INET#FE1000 prodos/sys/INET.REL cp rel/DHCP#FE1000 prodos/sys/DHCP.REL cp rel/ETHERIP#FE1000 prodos/sys/ETHERIP.REL +cp rel/apple/MOUSE#FE1000 prodos/sys/MOUSE.REL cp rel/apple/UTHERNET2#FE1000 prodos/sys/UTHERNET2.REL cp rel/apple/UTHERNET#FE1000 prodos/sys/UTHERNET.REL cp rel/apple/PORTIO#FE1000 prodos/sys/PORTIO.REL From 5ab6d915b328fe1c606ec270e614b9834fc6c5c5 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Thu, 26 Apr 2018 20:00:15 -0700 Subject: [PATCH 50/74] track down mouse int corrption --- src/libsrc/apple/mouse.pla | 118 ++++++++++++++++++++++++++++--------- 1 file changed, 90 insertions(+), 28 deletions(-) diff --git a/src/libsrc/apple/mouse.pla b/src/libsrc/apple/mouse.pla index 742de36..885278f 100644 --- a/src/libsrc/apple/mouse.pla +++ b/src/libsrc/apple/mouse.pla @@ -1,20 +1,39 @@ include "inc/cmdsys.plh" // +// Status bits +// +const BUTTON_DOWN = $80 +const BUTTON_LAST_DOWN = $40 +const MOUSE_MOVED = $20 +const VBL_INT = $08 +const BUTTON_INT = $04 +const MOVE_INT = $02 +// +// Mode bits +// +const VBL_INT_ENABLE = $08 +const BUTTON_INT_ENABLE= $04 +const MOVE_INT_ENABLE = $02 +// // Mouse driver // word rom -byte slot, index +byte slot, index, page +word setMouseFW, serveMouseFW, readMouseFW, clearMouseFW, posMouseFW, clampMouseFW, homeMouseFW, initMouseFW +word minClamp, maxClamp, xMouse, yMouse, statMouse, modeMouse +asm equates + !SOURCE "vmsrc/plvmzp.inc" +end // // Serve Mouse/VBL IRQ // -asm servMouse#0 -SLOT = $FA ; TEMPS FOR TESTING -TIMER = $FB +asm serviceMouse#0 +TIMER = $400+36 ; $FB CLD JSR $C400 BCS MOUEX ; NOT MOUSE INT - LDY SLOT ; CHECK MOUSE INT CAUSE - LDA $0778,Y ; WAS IT VBL? + LDY $0778+4 ; CHECK MOUSE INT CAUSE + TYA ; WAS IT VBL? AND #$08 BEQ + ; NOPE, MOVE OR BUTTON INC TIMER @@ -24,18 +43,15 @@ TIMER = $FB INC TIMER+2 BNE + INC TIMER+3 -+ LDA $0778,Y ; MOUSE MOVE OR BUTTON ACTIVE ++ TYA ; MOUSE MOVE OR BUTTON ACTIVE AND #$86 BNE + -MOUEX SEC - RTS +MOUEX RTS end -asm readMouse#0 +asm updateMouse#0 + LDX #$C4 LDY #$40 - JSR $C400 ; IIGS REQUIRES THIS HAPPEN IN IRQ - CLC - RTS + JMP $C400 ; IIGS REQUIRES THIS HAPPEN IN IRQ end export asm readTimer#2 PHP @@ -53,17 +69,45 @@ export asm readTimer#2 PLP RTS end +export asm readMouse#3 + LDY #$04 + PHP + SEI + DEX + DEX + DEX + LDA $0478,Y + STA ESTKL+2,X + LDA $0578,Y + STA ESTKH+2,X + LDA $04F8,Y + STA ESTKL+1,X + LDA $05F8,Y + STA ESTKH+1,X + LDA $0778,Y + STA ESTKL,X + LDA #$00 + STA ESTKH,X + PLP + RTS +end export def mouseInit byte params[4] - // - // Hook mouse IRQ handler into ProDOS IRQ chain - // - params.0 = 2 - params.1 = 0 - params:2 = @servMouse - syscall($40, @params) - return rom <> 0 + if rom + // + // Hook mouse IRQ handler into ProDOS IRQ chain + // + puts("serviceMouse @ $"); puth(@serviceMouse); putln; getc + params.0 = 2 + params.1 = 0 + params:2 = @serviceMouse + syscall($40, @params) + call(initMouseFW, $00, slot, page, $04) + call(setMouseFW, $09, slot, page, $04) + return 0 + fin + return -1 end // // Identify Mouse card/slot and initialize @@ -73,14 +117,32 @@ for rom = $C100 to $C700 step $0100 // // Fix-up IRQ routine // - slot = rom >> 8 - index = slot << 4 - servMouse:2 = rom - readMouse.1 = slot - readMouse.3 = index - readMouse:5 = rom + slot = rom >> 8 + index = slot & $07 + page = index << 4 + minClamp = $0478 + maxClamp = $04F8 + xMouse = $0478 + index + yMouse = $04F8 + index + statMouse = $0778 + index + modeMouse = $07F8 + index + setMouseFW = rom + rom->$12 + serveMouseFW = rom + rom->$13 + readMouseFW = rom + rom->$14 + clearMouseFW = rom + rom->$15 + posMouseFW = rom + rom->$16 + clampMouseFW = rom + rom->$17 + homeMouseFW = rom + rom->$18 + initMouseFW = rom + rom->$19 + serviceMouse:2 = serveMouseFW + serviceMouse:7 = statMouse + updateMouse.1 = slot + updateMouse.3 = page + updateMouse:5 = readMouseFW + readMouse.1 = index puts("Found Mouse in slot #"); putc('0' + ((rom >> 8) & $07)); putln - return + mouseInit + return modkeep fin next // From 1783aaef7a38ec5e1296707db73f90e8f594362c Mon Sep 17 00:00:00 2001 From: Dave Schmenk Date: Fri, 27 Apr 2018 13:06:49 -0700 Subject: [PATCH 51/74] Fix resetmemfiles, use heap for catalog/volumes, and free CMD init code --- src/libsrc/apple/jit.pla | 2 +- src/libsrc/apple/jit16.pla | 2 +- src/libsrc/apple/mouse.pla | 2 +- src/vmsrc/apple/cmd.pla | 124 +++++++++++++++++--------------- src/vmsrc/apple/cmdjit.pla | 132 +++++++++++++++++++---------------- src/vmsrc/apple/cmdjitstub.s | 4 -- src/vmsrc/apple/cmdstub.s | 4 -- src/vmsrc/apple/plvmjit02.s | 17 ++--- 8 files changed, 150 insertions(+), 137 deletions(-) diff --git a/src/libsrc/apple/jit.pla b/src/libsrc/apple/jit.pla index dc4331c..356f791 100644 --- a/src/libsrc/apple/jit.pla +++ b/src/libsrc/apple/jit.pla @@ -42,6 +42,6 @@ fin *jitcomp = @compiler cmdsys.jitcount = 44 cmdsys.jitsize = 96 -puts("JITC") +puts("JITC enabled\n") return modkeep done diff --git a/src/libsrc/apple/jit16.pla b/src/libsrc/apple/jit16.pla index 0b61a9f..7b0c39c 100644 --- a/src/libsrc/apple/jit16.pla +++ b/src/libsrc/apple/jit16.pla @@ -48,6 +48,6 @@ fin *jitcomp = @compiler cmdsys.jitcount = 44 cmdsys.jitsize = 96 -puts("16-bit VM/JITC") +puts("16-bit VM/JITC enabled\n") return modkeep done diff --git a/src/libsrc/apple/mouse.pla b/src/libsrc/apple/mouse.pla index 885278f..baa8c97 100644 --- a/src/libsrc/apple/mouse.pla +++ b/src/libsrc/apple/mouse.pla @@ -98,7 +98,7 @@ export def mouseInit // // Hook mouse IRQ handler into ProDOS IRQ chain // - puts("serviceMouse @ $"); puth(@serviceMouse); putln; getc + puts("serviceMouse @ $"); puth(@serviceMouse); putln params.0 = 2 params.1 = 0 params:2 = @serviceMouse diff --git a/src/vmsrc/apple/cmd.pla b/src/vmsrc/apple/cmd.pla index 61f450f..b445618 100755 --- a/src/vmsrc/apple/cmd.pla +++ b/src/vmsrc/apple/cmd.pla @@ -1,6 +1,5 @@ const MACHID = $BF98 const iobuffer = $0800 -const databuff = $2000 const RELADDR = $1000 const symtbl = $0C00 const freemem = $0006 @@ -1157,9 +1156,9 @@ def volumes()#0 params.0 = 2 params.1 = 0 - params:2 = databuff + params:2 = heap perr = syscall($C5, @params) - strbuf = databuff + strbuf = heap for i = 0 to 15 ^strbuf = ^strbuf & $0F if ^strbuf @@ -1184,12 +1183,12 @@ def catalog(path)#0 fin firstblk = 1 repeat - if read(refnum, databuff, 512) == 512 - entry = databuff + 4 + if read(refnum, heap, 512) == 512 + entry = heap + 4 if firstblk - entrylen = databuff.$23 - entriesblk = databuff.$24 - filecnt = databuff:$25 + entrylen = heap->$23 + entriesblk = heap->$24 + filecnt = heap=>$25 entry = entry + entrylen fin for i = firstblk to entriesblk @@ -1272,7 +1271,7 @@ def resetmemfiles()#0 // // Close all files // - ^$BFD8 = 0 + ^$BF94 = 0 close(0) // // Set memory bitmap @@ -1291,7 +1290,7 @@ def execsys(sysfile)#0 striptrail(sysfile) refnum = open(sysfile) if refnum - len = read(refnum, databuff, $FFFF) + len = read(refnum, $2000, $FFFF) resetmemfiles() if len strcpy(sysfile, $280) @@ -1326,13 +1325,68 @@ def execmod(modfile)#1 return -perr end // +// Command line processor +// +def docmds#0 + while 1 + if ^getlnbuf + strcpy(@cmdln, getlnbuf) + when toupper(parsecmd(getlnbuf)) + is 'C' + catalog(getlnbuf) + break + is 'P' + pfxop(getlnbuf, SET_PFX) + break + is '/' + repeat + prefix-- + until prefix[prefix] == '/' + if prefix > 1 + pfxop(@prefix, SET_PFX) + fin + break + is 'V' + volumes() + break + is '-' + execsys(getlnbuf) + break + is '+' + execmod(striptrail(getlnbuf)) + // + // Clean up + // + resetmemfiles + break + otherwise + cout('?') + wend + if perr + prstr("ERR:$") + prbyte(perr) + else + prstr("OK") + fin + crout() + fin + prstr(pfxop(@prefix, GET_PFX)) + rdstr($BA) + loop +end +// +// Dummy definition to get free heap +// +def lastdef#0 +end +// // Get heap start. // -heap = *freemem +heap = @lastdef // // Print PLASMA version // -prstr("PLASMA 2.0 Dev 64K \n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout +prstr("PLASMA 2.0 Dev 64K\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout // // Init symbol table. // @@ -1361,49 +1415,5 @@ else prstr("MEM FREE:$"); prword(availheap); crout fin perr = 0 -while 1 - if ^getlnbuf - strcpy(@cmdln, getlnbuf) - when toupper(parsecmd(getlnbuf)) - is 'C' - catalog(getlnbuf) - break - is 'P' - pfxop(getlnbuf, SET_PFX) - break - is '/' - repeat - prefix-- - until prefix[prefix] == '/' - if prefix > 1 - pfxop(@prefix, SET_PFX) - fin - break - is 'V' - volumes() - break - is '-' - execsys(getlnbuf) - break - is '+' - execmod(striptrail(getlnbuf)) - // - // Clean up - // - resetmemfiles - break - otherwise - cout(perr)//cout('?') - wend - if perr - prstr("ERR:$") - prbyte(perr) - else - prstr("OK") - fin - crout() - fin - prstr(pfxop(@prefix, GET_PFX)) - rdstr($BA) -loop +docmds done diff --git a/src/vmsrc/apple/cmdjit.pla b/src/vmsrc/apple/cmdjit.pla index 8931509..ced5103 100755 --- a/src/vmsrc/apple/cmdjit.pla +++ b/src/vmsrc/apple/cmdjit.pla @@ -1,6 +1,5 @@ const MACHID = $BF98 const iobuffer = $0800 -const databuff = $2000 const RELADDR = $1000 const symtbl = $0C00 const freemem = $0006 @@ -1221,9 +1220,9 @@ def volumes()#0 params.0 = 2 params.1 = 0 - params:2 = databuff + params:2 = heap perr = syscall($C5, @params) - strbuf = databuff + strbuf = heap for i = 0 to 15 ^strbuf = ^strbuf & $0F if ^strbuf @@ -1248,12 +1247,12 @@ def catalog(path)#0 fin firstblk = 1 repeat - if read(refnum, databuff, 512) == 512 - entry = databuff + 4 + if read(refnum, heap, 512) == 512 + entry = heap + 4 if firstblk - entrylen = databuff.$23 - entriesblk = databuff.$24 - filecnt = databuff:$25 + entrylen = heap->$23 + entriesblk = heap->$24 + filecnt = heap=>$25 entry = entry + entrylen fin for i = firstblk to entriesblk @@ -1336,7 +1335,7 @@ def resetmemfiles()#0 // // Close all files // - ^$BFD8 = 0 + ^$BF94 = 0 close(0) // // Set memory bitmap @@ -1355,7 +1354,7 @@ def execsys(sysfile)#0 striptrail(sysfile) refnum = open(sysfile) if refnum - len = read(refnum, databuff, $FFFF) + len = read(refnum, $2000, $FFFF) resetmemfiles() if len strcpy(sysfile, $280) @@ -1394,13 +1393,71 @@ def execmod(modfile)#1 return -perr end // +// Command line processor +// +def docmds#0 + loadmod(jitmod) // Cannot do this in init code - it will overwrite it! + xheap = $0400 // Reset heap to point at low memory + xheaptop = $A000 // Top below JITC + while 1 + if ^getlnbuf + strcpy(@cmdln, getlnbuf) + when toupper(parsecmd(getlnbuf)) + is 'C' + catalog(getlnbuf) + break + is 'P' + pfxop(getlnbuf, SET_PFX) + break + is '/' + repeat + prefix-- + until prefix[prefix] == '/' + if prefix > 1 + pfxop(@prefix, SET_PFX) + fin + break + is 'V' + volumes() + break + is '-' + execsys(getlnbuf) + break + is '+' + execmod(striptrail(getlnbuf)) + // + // Clean up + // + resetmemfiles + break + otherwise + cout('?') + wend + if perr + prstr("ERR:$") + prbyte(perr) + else + prstr("OK") + fin + crout() + fin + prstr(pfxop(@prefix, GET_PFX)) + rdstr($BA) + loop +end +// +// Dummy definition to get free heap +// +def lastdef#0 +end +// // Get heap start. // -heap = *freemem +heap = @lastdef // // Print PLASMA version // -prstr("PLASMA 2.0 Dev 128K ")//; prbyte(version.1); cout('.'); prbyte(version.0); crout +prstr("PLASMA 2.0 Dev 128K\n")//; prbyte(version.1); cout('.'); prbyte(version.0); crout // // Init symbol table. // @@ -1415,9 +1472,6 @@ loop strcat(strcpy(@sysmods, $280), "SYS/")) // This is the path to CMD syspath = @sysmods // Update external interface table syscmdln = @cmdln -loadmod(jitmod) -xheap = $0400 // Reset heap to point at low memory -xheaptop = $A000 // Top where JIT loaded // // Try to load autorun. // @@ -1429,52 +1483,8 @@ else // // Print some startup info. // - prstr("\nMEM FREE:$"); prword(availheap); crout + prstr("MEM FREE:$"); prword(availheap); crout fin perr = 0 -while 1 - if ^getlnbuf - strcpy(@cmdln, getlnbuf) - when toupper(parsecmd(getlnbuf)) - is 'C' - catalog(getlnbuf) - break - is 'P' - pfxop(getlnbuf, SET_PFX) - break - is '/' - repeat - prefix-- - until prefix[prefix] == '/' - if prefix > 1 - pfxop(@prefix, SET_PFX) - fin - break - is 'V' - volumes() - break - is '-' - execsys(getlnbuf) - break - is '+' - execmod(striptrail(getlnbuf)) - // - // Clean up - // - resetmemfiles - break - otherwise - cout('?') - wend - if perr - prstr("ERR:$") - prbyte(perr) - else - prstr("OK") - fin - crout() - fin - prstr(pfxop(@prefix, GET_PFX)) - rdstr($BA) -loop +docmds done diff --git a/src/vmsrc/apple/cmdjitstub.s b/src/vmsrc/apple/cmdjitstub.s index ba4e9af..4f8957a 100644 --- a/src/vmsrc/apple/cmdjitstub.s +++ b/src/vmsrc/apple/cmdjitstub.s @@ -27,10 +27,6 @@ JITCODE = $03E4 INC DSTH DEX ; STOP WHEN DST=$2000 REACHED BNE - - LDA #<_CMDEND - STA SRCL - LDA #>_CMDEND - STA SRCH ; ; INIT VM ENVIRONMENT STACK POINTERS ; diff --git a/src/vmsrc/apple/cmdstub.s b/src/vmsrc/apple/cmdstub.s index 54527d4..dc7ee90 100644 --- a/src/vmsrc/apple/cmdstub.s +++ b/src/vmsrc/apple/cmdstub.s @@ -25,10 +25,6 @@ LCBNK1 = $08 INC DSTH DEX ; STOP WHEN DST=$2000 REACHED BNE - - LDA #<_CMDEND - STA SRCL - LDA #>_CMDEND - STA SRCH ; ; INIT VM ENVIRONMENT STACK POINTERS ; diff --git a/src/vmsrc/apple/plvmjit02.s b/src/vmsrc/apple/plvmjit02.s index 3e10cd2..9c05eab 100755 --- a/src/vmsrc/apple/plvmjit02.s +++ b/src/vmsrc/apple/plvmjit02.s @@ -1832,7 +1832,7 @@ CALL INY ;+INC_IP LDA (IP),Y STA TMPH TYA - CLC + SEC ADC IPL PHA LDA IPH @@ -1845,7 +1845,7 @@ CALL INY ;+INC_IP STA IPL LDA #>OPTBL ; MAKE SURE WE'RE INDEXING THE RIGHT TABLE STA OPPAGE - LDY #$01 + LDY #$00 JMP FETCHOP CALLX INY ;+INC_IP LDA (IP),Y @@ -1854,7 +1854,7 @@ CALLX INY ;+INC_IP LDA (IP),Y STA TMPH TYA - CLC + SEC ADC IPL PHA LDA IPH @@ -1876,7 +1876,7 @@ CALLX INY ;+INC_IP STA IPL LDA #>OPXTBL ; MAKE SURE WE'RE INDEXING THE RIGHT TABLE STA OPPAGE - LDY #$01 + LDY #$00 JMP FETCHOP ;* ;* INDIRECT CALL TO ADDRESS (NATIVE CODE) @@ -1887,7 +1887,7 @@ ICAL LDA ESTKL,X STA TMPH INX TYA - CLC + SEC ADC IPL PHA LDA IPH @@ -1900,7 +1900,7 @@ ICAL LDA ESTKL,X STA IPL LDA #>OPTBL ; MAKE SURE WE'RE INDEXING THE RIGHT TABLE STA OPPAGE - LDY #$01 + LDY #$00 JMP FETCHOP ICALX LDA ESTKL,X STA TMPL @@ -1908,7 +1908,7 @@ ICALX LDA ESTKL,X STA TMPH INX TYA - CLC + SEC ADC IPL PHA LDA IPH @@ -1922,6 +1922,7 @@ ICALX LDA ESTKL,X PHP PLA STA PSR + SEI STA ALTRDON PLA STA IPH @@ -1929,7 +1930,7 @@ ICALX LDA ESTKL,X STA IPL LDA #>OPXTBL ; MAKE SURE WE'RE INDEXING THE RIGHT TABLE STA OPPAGE - LDY #$01 + LDY #$00 JMP FETCHOP ;* ;* JUMP INDIRECT TRHOUGH TMP From 3eb62ead0d40c4e636cdaabbc78c1e906d6eab96 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Fri, 27 Apr 2018 19:35:26 -0700 Subject: [PATCH 52/74] Clean mouse init up --- src/libsrc/apple/mouse.pla | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/libsrc/apple/mouse.pla b/src/libsrc/apple/mouse.pla index baa8c97..a652262 100644 --- a/src/libsrc/apple/mouse.pla +++ b/src/libsrc/apple/mouse.pla @@ -19,6 +19,7 @@ const MOVE_INT_ENABLE = $02 // word rom byte slot, index, page +byte params[] word setMouseFW, serveMouseFW, readMouseFW, clearMouseFW, posMouseFW, clampMouseFW, homeMouseFW, initMouseFW word minClamp, maxClamp, xMouse, yMouse, statMouse, modeMouse asm equates @@ -104,11 +105,24 @@ export def mouseInit params:2 = @serviceMouse syscall($40, @params) call(initMouseFW, $00, slot, page, $04) - call(setMouseFW, $09, slot, page, $04) + call(setMouseFW, $07, slot, page, $04) return 0 fin return -1 end +def printmouse#0 + word x, y + byte stat + + while ^$C000 < 128 + x, y, stat = readMouse + ^$24 = ^$20 + puti(x); puts(", ") + puti(y); puts(", $") + putb(stat); puts(" ") + loop + ^$C010 +end // // Identify Mouse card/slot and initialize // @@ -142,6 +156,7 @@ for rom = $C100 to $C700 step $0100 readMouse.1 = index puts("Found Mouse in slot #"); putc('0' + ((rom >> 8) & $07)); putln mouseInit + printmouse return modkeep fin next From d52bf0734489c447577c88cd4df4eb35150f1f98 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Fri, 27 Apr 2018 19:36:01 -0700 Subject: [PATCH 53/74] Clen mouse init up --- src/libsrc/apple/mouse.pla | 48 +++++++++++--------------------------- 1 file changed, 13 insertions(+), 35 deletions(-) diff --git a/src/libsrc/apple/mouse.pla b/src/libsrc/apple/mouse.pla index a652262..ef40459 100644 --- a/src/libsrc/apple/mouse.pla +++ b/src/libsrc/apple/mouse.pla @@ -92,44 +92,21 @@ export asm readMouse#3 PLP RTS end -export def mouseInit - byte params[4] - - if rom - // - // Hook mouse IRQ handler into ProDOS IRQ chain - // - puts("serviceMouse @ $"); puth(@serviceMouse); putln - params.0 = 2 - params.1 = 0 - params:2 = @serviceMouse - syscall($40, @params) - call(initMouseFW, $00, slot, page, $04) - call(setMouseFW, $07, slot, page, $04) - return 0 - fin - return -1 -end -def printmouse#0 - word x, y - byte stat - - while ^$C000 < 128 - x, y, stat = readMouse - ^$24 = ^$20 - puti(x); puts(", ") - puti(y); puts(", $") - putb(stat); puts(" ") - loop - ^$C010 -end // // Identify Mouse card/slot and initialize // for rom = $C100 to $C700 step $0100 if rom->5 == $38 and rom->7 == $18 and rom->11 == $01 and rom->12 == $20 + puts("Found Mouse in slot #"); putc('0' + ((rom >> 8) & $07)); putln // - // Fix-up IRQ routine + // Hook mouse IRQ handler into ProDOS IRQ chain + // + params.0 = 2 + params.1 = 0 + params:2 = @serviceMouse + syscall($40, @params) + // + // Set values // slot = rom >> 8 index = slot & $07 @@ -148,15 +125,16 @@ for rom = $C100 to $C700 step $0100 clampMouseFW = rom + rom->$17 homeMouseFW = rom + rom->$18 initMouseFW = rom + rom->$19 + // + // Fix-up IRQ routine + // serviceMouse:2 = serveMouseFW serviceMouse:7 = statMouse updateMouse.1 = slot updateMouse.3 = page updateMouse:5 = readMouseFW readMouse.1 = index - puts("Found Mouse in slot #"); putc('0' + ((rom >> 8) & $07)); putln - mouseInit - printmouse + call(initMouseFW, $00, slot, page, $04) return modkeep fin next From 0f2a76dd557238c04e6394f5be030d24e9f0c4c4 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Fri, 27 Apr 2018 19:47:23 -0700 Subject: [PATCH 54/74] Fix infunc for asm defs --- src/toolsrc/parse.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/toolsrc/parse.c b/src/toolsrc/parse.c index d4eac2b..2349fc5 100755 --- a/src/toolsrc/parse.c +++ b/src/toolsrc/parse.c @@ -1688,6 +1688,7 @@ int parse_defs(void) next_line(); } while (scantoken != END_TOKEN); scan(); + infunc = 0; return (1); } return (scantoken == EOL_TOKEN); From d5f812d87808ede83c15b7a854235e0b7b0e653f Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 28 Apr 2018 07:15:56 -0700 Subject: [PATCH 55/74] check for mouse/VBL events --- src/libsrc/apple/mouse.pla | 67 +++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 29 deletions(-) diff --git a/src/libsrc/apple/mouse.pla b/src/libsrc/apple/mouse.pla index ef40459..4eed81b 100644 --- a/src/libsrc/apple/mouse.pla +++ b/src/libsrc/apple/mouse.pla @@ -18,7 +18,7 @@ const MOVE_INT_ENABLE = $02 // Mouse driver // word rom -byte slot, index, page +byte slot, index, page, vblInt, mouInt byte params[] word setMouseFW, serveMouseFW, readMouseFW, clearMouseFW, posMouseFW, clampMouseFW, homeMouseFW, initMouseFW word minClamp, maxClamp, xMouse, yMouse, statMouse, modeMouse @@ -29,7 +29,8 @@ end // Serve Mouse/VBL IRQ // asm serviceMouse#0 -TIMER = $400+36 ; $FB +VBLINT = $400 ; DUMMY VALUES TO BE FIXED-UP +MOUINT = $401 CLD JSR $C400 BCS MOUEX ; NOT MOUSE INT @@ -37,46 +38,29 @@ TIMER = $400+36 ; $FB TYA ; WAS IT VBL? AND #$08 BEQ + ; NOPE, MOVE OR BUTTON - INC TIMER - BNE + - INC TIMER+1 - BNE + - INC TIMER+2 - BNE + - INC TIMER+3 +end +asm vblEvent + INC VBLINT ; INC VBL EVENT + TYA ; MOUSE MOVE OR BUTTON ACTIVE AND #$86 BNE + MOUEX RTS end +asm mouseEvent ++ INC MOUINT ; INC MOUSE EVENT +end asm updateMouse#0 -+ LDX #$C4 + LDX #$C4 LDY #$40 JMP $C400 ; IIGS REQUIRES THIS HAPPEN IN IRQ end -export asm readTimer#2 - PHP - SEI - DEX - DEX - LDA TIMER - STA ESTKL+1,X - LDA TIMER+1 - STA ESTKH+1,X - LDA TIMER+2 - STA ESTKL,X - LDA TIMER+3 - STA ESTKH,X - PLP - RTS -end export asm readMouse#3 LDY #$04 + DEX + DEX + DEX PHP SEI - DEX - DEX - DEX LDA $0478,Y STA ESTKL+2,X LDA $0578,Y @@ -93,6 +77,29 @@ export asm readMouse#3 RTS end // +// Check for VBL (timer) and Mouse events +// +asm chkEvt(addr) + LDA ESTKL,X + STA ESTKH-1,X + PHP + SEI + LDA (ESTKH-1,X) ; READ INT COUNT + TAY + LDA #$00 + STA (ESTKH-1,X) ; CLEAR INT COUNT + PLP + STY ESTKL,X ; RETURN INT COUNT + STA ESTKH,X + RTS +end +def chkTimer + return chkEvt(@vblInt) +end +def chkMouse + return chkEvt(@mouInt) +end +// // Identify Mouse card/slot and initialize // for rom = $C100 to $C700 step $0100 @@ -130,6 +137,8 @@ for rom = $C100 to $C700 step $0100 // serviceMouse:2 = serveMouseFW serviceMouse:7 = statMouse + vblEvent.1 = @vblInt + mouseEvent.1 = @mouInt updateMouse.1 = slot updateMouse.3 = page updateMouse:5 = readMouseFW From 67d0762272ff82f6c11f7bb2af62b3b07d15b037 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 28 Apr 2018 08:00:10 -0700 Subject: [PATCH 56/74] Prepare for event manager --- src/libsrc/apple/mouse.pla | 20 ++++++++++++++++++-- src/libsrc/apple/uthernet2.pla | 8 ++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/libsrc/apple/mouse.pla b/src/libsrc/apple/mouse.pla index 4eed81b..b2bedd9 100644 --- a/src/libsrc/apple/mouse.pla +++ b/src/libsrc/apple/mouse.pla @@ -18,7 +18,7 @@ const MOVE_INT_ENABLE = $02 // Mouse driver // word rom -byte slot, index, page, vblInt, mouInt +byte slot, index, page, vblDiv, vblInt, mouInt byte params[] word setMouseFW, serveMouseFW, readMouseFW, clearMouseFW, posMouseFW, clampMouseFW, homeMouseFW, initMouseFW word minClamp, maxClamp, xMouse, yMouse, statMouse, modeMouse @@ -93,9 +93,25 @@ asm chkEvt(addr) STA ESTKH,X RTS end +// +// Convert VBL interrupts into millisecond timer increment +// def chkTimer - return chkEvt(@vblInt) + byte count + word msec + + msec = 0 + count = chkEvt(@vblInt) + while count + msec = msec + (vblDiv & 2 ?? 16 :: 17) + vblDiv = (vblDiv + 1) % 3 + count-- + loop + return msec end +// +// Check for mouse interrupt events +// def chkMouse return chkEvt(@mouInt) end diff --git a/src/libsrc/apple/uthernet2.pla b/src/libsrc/apple/uthernet2.pla index e18c983..fd0c48e 100644 --- a/src/libsrc/apple/uthernet2.pla +++ b/src/libsrc/apple/uthernet2.pla @@ -791,11 +791,11 @@ def wizServiceIP fin wiz = wiz + t_channel next - if ir & $80 + if ir & $80 // - // IP conflict - // - pokereg(WIZ_IR, $80) + // IP conflict + // + pokereg(WIZ_IR, $80) fin if ir & $40 // From 3db676c5dd7971ce7be70dc02f29e33e8e863ba2 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 28 Apr 2018 13:34:05 -0700 Subject: [PATCH 57/74] Mouse API test --- src/inc/mouse.plh | 31 ++++++++ src/libsrc/apple/mouse.pla | 143 +++++++++++++++++++++--------------- src/mkrel | 2 + src/samplesrc/mousetest.pla | 11 +++ 4 files changed, 128 insertions(+), 59 deletions(-) create mode 100644 src/inc/mouse.plh create mode 100644 src/samplesrc/mousetest.pla diff --git a/src/inc/mouse.plh b/src/inc/mouse.plh new file mode 100644 index 0000000..3466b93 --- /dev/null +++ b/src/inc/mouse.plh @@ -0,0 +1,31 @@ +import mouse + // + // Status bits + // + const BUTTON_DOWN = $80 + const BUTTON_LAST_DOWN = $40 + const MOUSE_MOVED = $20 + const VBL_INT = $08 + const BUTTON_INT = $04 + const MOVE_INT = $02 + // + // Mode bits + // + const VBL_INT_ENABLE = $08 + const BUTTON_INT_ENABLE= $04 + const MOVE_INT_ENABLE = $02 + // + // Mouse API + // + struc t_mouse + word chkVbl + word chkMouse + word readMouse // readMouse()#3 + word setMouse // setMouse(mode) + word clearMouse + word posMouse // posMouse(x, y) + word clampMouse // clampMouse(xMin, xMax, yMin, yMax) + word homeMouse + word detachMouse + end +end diff --git a/src/libsrc/apple/mouse.pla b/src/libsrc/apple/mouse.pla index b2bedd9..31e5fbc 100644 --- a/src/libsrc/apple/mouse.pla +++ b/src/libsrc/apple/mouse.pla @@ -1,27 +1,14 @@ include "inc/cmdsys.plh" // -// Status bits -// -const BUTTON_DOWN = $80 -const BUTTON_LAST_DOWN = $40 -const MOUSE_MOVED = $20 -const VBL_INT = $08 -const BUTTON_INT = $04 -const MOVE_INT = $02 -// -// Mode bits -// -const VBL_INT_ENABLE = $08 -const BUTTON_INT_ENABLE= $04 -const MOVE_INT_ENABLE = $02 -// -// Mouse driver +// Mouse driver interface // +predef chkVbl, chkMouse, readMouse#3, setMouse(mode), clearMouse, posMouse(x, y), clampMouse(xMin, xMax, yMin, yMax), homeMouse, detachMouse +word = @chkVbl, @chkMouse, @readMouse, @setMouse, @clearMouse, @posMouse, @clampMouse, @homeMouse, @detachMouse word rom -byte slot, index, page, vblDiv, vblInt, mouInt byte params[] -word setMouseFW, serveMouseFW, readMouseFW, clearMouseFW, posMouseFW, clampMouseFW, homeMouseFW, initMouseFW -word minClamp, maxClamp, xMouse, yMouse, statMouse, modeMouse +byte slot, index, page +word setMouseFW +byte vblDiv, vblInt, mouInt asm equates !SOURCE "vmsrc/plvmzp.inc" end @@ -49,12 +36,29 @@ end asm mouseEvent + INC MOUINT ; INC MOUSE EVENT end -asm updateMouse#0 +asm updateMouse LDX #$C4 LDY #$40 JMP $C400 ; IIGS REQUIRES THIS HAPPEN IN IRQ end -export asm readMouse#3 +// +// Check for VBL (timer) and Mouse events (atomic read and reset) +// +asm chkEvt(addr) + LDA ESTKL,X + STA ESTKH-1,X + PHP + SEI + LDA (ESTKH-1,X) ; READ INT COUNT + TAY + LDA #$00 + STA (ESTKH-1,X) ; CLEAR INT COUNT + PLP + STY ESTKL,X ; RETURN INT COUNT + STA ESTKH,X + RTS +end +asm readMouse#3 LDY #$04 DEX DEX @@ -77,45 +81,79 @@ export asm readMouse#3 RTS end // -// Check for VBL (timer) and Mouse events -// -asm chkEvt(addr) - LDA ESTKL,X - STA ESTKH-1,X - PHP - SEI - LDA (ESTKH-1,X) ; READ INT COUNT - TAY - LDA #$00 - STA (ESTKH-1,X) ; CLEAR INT COUNT - PLP - STY ESTKL,X ; RETURN INT COUNT - STA ESTKH,X - RTS -end -// // Convert VBL interrupts into millisecond timer increment // -def chkTimer +def chkVblTimer byte count word msec msec = 0 count = chkEvt(@vblInt) while count - msec = msec + (vblDiv & 2 ?? 16 :: 17) - vblDiv = (vblDiv + 1) % 3 + if vblDiv & 2 + msec = msec + 16 + vblDiv = 0 + else + msec = msec + 17 + vblDiv++ + fin count-- loop return msec end // -// Check for mouse interrupt events +// Check for VBL/Mouse interrupt events // +def chkVbl + return chkEvt(@vblInt) +end def chkMouse return chkEvt(@mouInt) end // +// Mouse routines +// +def setMouse(mode) + return call(setMouseFW, mode, slot, page, $04) +end +def clearMouse + return call(rom + rom->$15, $00, slot, page, $04) // clearMouseFW +end +def posMouse(x, y) + // + // Fill screen holes + // + ^($0478 + index) = x + ^($0578 + index) = x >> 8 + ^($04F8 + index) = y + ^($05F8 + index) = y >> 8 + return call(rom + rom->$16, $00, slot, page, $04) // posMouseFW +end +def clampMouse(xMin, xMax, yMin, yMax) + ^$0478 = xMin + ^$0578 = xMin >> 8 + ^$04F8 = xMax + ^$05F8 = xMax >> 8 + call(rom + rom->$17, $00, slot, page, $04) // clampMouseFW + ^$0478 = yMin + ^$0578 = yMin >> 8 + ^$04F8 = yMax + ^$05F8 = yMax >> 8 + return call(rom + rom->$17, $01, slot, page, $04)) // clampMouseFW +end +def homeMouse + return call(rom + rom->$18, $00, slot, page, $04) // homeMouseFW +end +// +// Detach mouse from interrupts +// +def detachMouse + setMouse(0) + params.0 = 1 + params.1 = 0 + return syscall($41, @params) +end +// // Identify Mouse card/slot and initialize // for rom = $C100 to $C700 step $0100 @@ -134,32 +172,19 @@ for rom = $C100 to $C700 step $0100 slot = rom >> 8 index = slot & $07 page = index << 4 - minClamp = $0478 - maxClamp = $04F8 - xMouse = $0478 + index - yMouse = $04F8 + index - statMouse = $0778 + index - modeMouse = $07F8 + index setMouseFW = rom + rom->$12 - serveMouseFW = rom + rom->$13 - readMouseFW = rom + rom->$14 - clearMouseFW = rom + rom->$15 - posMouseFW = rom + rom->$16 - clampMouseFW = rom + rom->$17 - homeMouseFW = rom + rom->$18 - initMouseFW = rom + rom->$19 // // Fix-up IRQ routine // - serviceMouse:2 = serveMouseFW - serviceMouse:7 = statMouse + serviceMouse:2 = rom + rom->$13 // serveMouseFW + serviceMouse:7 = $0778+index vblEvent.1 = @vblInt mouseEvent.1 = @mouInt updateMouse.1 = slot updateMouse.3 = page - updateMouse:5 = readMouseFW + updateMouse:5 = rom + rom->$14 // readMouseFW readMouse.1 = index - call(initMouseFW, $00, slot, page, $04) + call(rom + rom->$19, $00, slot, page, $04) // initMouseFW return modkeep fin next diff --git a/src/mkrel b/src/mkrel index 6c535ab..10ad8c1 100755 --- a/src/mkrel +++ b/src/mkrel @@ -88,6 +88,7 @@ cp samplesrc/dgrtest.pla prodos/bld/DGRTEST.PLA.TXT cp samplesrc/hello.pla prodos/bld/HELLO.PLA.TXT cp samplesrc/hgr1test.pla prodos/bld/HGR1TEST.PLA.TXT cp samplesrc/fibertest.pla prodos/bld/FIBERTEST.PLA.TXT +cp samplesrc/mousetest.pla prodos/bld/MOUSETEST.PLA.TXT cp samplesrc/mon.pla prodos/bld/MON.PLA.TXT cp samplesrc/memtest.pla prodos/bld/MEMTEST.PLA.TXT cp samplesrc/rod.pla prodos/bld/ROD.PLA.TXT @@ -113,6 +114,7 @@ cp inc/fiber.plh prodos/bld/inc/FIBER.PLH.TXT cp inc/fileio.plh prodos/bld/inc/FILEIO.PLH.TXT cp inc/fpstr.plh prodos/bld/inc/FPSTR.PLH.TXT cp inc/fpu.plh prodos/bld/inc/FPU.PLH.TXT +cp inc/mouse.plh prodos/bld/inc/MOUSE.PLH.TXT cp inc/inet.plh prodos/bld/inc/INET.PLH.TXT cp inc/longjmp.plh prodos/bld/inc/LONGJMP.PLH.TXT cp inc/memmgr.plh prodos/bld/inc/MEMMGR.PLH.TXT diff --git a/src/samplesrc/mousetest.pla b/src/samplesrc/mousetest.pla new file mode 100644 index 0000000..1a5a1b2 --- /dev/null +++ b/src/samplesrc/mousetest.pla @@ -0,0 +1,11 @@ +include "inc/cmdsys.plh" +include "inc/mouse.plh" + +var count + +mouse:setmouse(VBL_INT_ENABLE) +while count < 100 + count = count + mouse:chkVBL() + puti(count); putln +loop +done From 78a068e6d2243b0e405126bf23d4c93e00a69a88 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 28 Apr 2018 17:11:12 -0700 Subject: [PATCH 58/74] fix addres of int counters --- src/libsrc/apple/mouse.pla | 5 +++-- src/samplesrc/mousetest.pla | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/libsrc/apple/mouse.pla b/src/libsrc/apple/mouse.pla index 31e5fbc..ec023fc 100644 --- a/src/libsrc/apple/mouse.pla +++ b/src/libsrc/apple/mouse.pla @@ -159,6 +159,7 @@ end for rom = $C100 to $C700 step $0100 if rom->5 == $38 and rom->7 == $18 and rom->11 == $01 and rom->12 == $20 puts("Found Mouse in slot #"); putc('0' + ((rom >> 8) & $07)); putln + puts("Service IRQ: $"); puth(@serviceMouse); putln // // Hook mouse IRQ handler into ProDOS IRQ chain // @@ -178,8 +179,8 @@ for rom = $C100 to $C700 step $0100 // serviceMouse:2 = rom + rom->$13 // serveMouseFW serviceMouse:7 = $0778+index - vblEvent.1 = @vblInt - mouseEvent.1 = @mouInt + vblEvent:1 = @vblInt + mouseEvent:1 = @mouInt updateMouse.1 = slot updateMouse.3 = page updateMouse:5 = rom + rom->$14 // readMouseFW diff --git a/src/samplesrc/mousetest.pla b/src/samplesrc/mousetest.pla index 1a5a1b2..9a33ec9 100644 --- a/src/samplesrc/mousetest.pla +++ b/src/samplesrc/mousetest.pla @@ -3,9 +3,9 @@ include "inc/mouse.plh" var count -mouse:setmouse(VBL_INT_ENABLE) -while count < 100 - count = count + mouse:chkVBL() +Mouse:setMouse(VBL_INT_ENABLE) +while count < 100 and ^$C000 < 128 + count = count + Mouse:chkVBL() puti(count); putln loop done From 3d44c8533b2872027dfdc4d07e5fc04bd289dccb Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 28 Apr 2018 18:43:57 -0700 Subject: [PATCH 59/74] Functional mouse API --- src/inc/mouse.plh | 3 ++- src/libsrc/apple/mouse.pla | 4 +--- src/samplesrc/mousetest.pla | 20 ++++++++++++++++---- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/inc/mouse.plh b/src/inc/mouse.plh index 3466b93..defda2c 100644 --- a/src/inc/mouse.plh +++ b/src/inc/mouse.plh @@ -14,11 +14,12 @@ import mouse const VBL_INT_ENABLE = $08 const BUTTON_INT_ENABLE= $04 const MOVE_INT_ENABLE = $02 + const MOUSE_ENABLE = $01 // // Mouse API // struc t_mouse - word chkVbl + word chkVBL word chkMouse word readMouse // readMouse()#3 word setMouse // setMouse(mode) diff --git a/src/libsrc/apple/mouse.pla b/src/libsrc/apple/mouse.pla index ec023fc..e80de1d 100644 --- a/src/libsrc/apple/mouse.pla +++ b/src/libsrc/apple/mouse.pla @@ -47,13 +47,12 @@ end asm chkEvt(addr) LDA ESTKL,X STA ESTKH-1,X - PHP SEI LDA (ESTKH-1,X) ; READ INT COUNT TAY LDA #$00 STA (ESTKH-1,X) ; CLEAR INT COUNT - PLP + CLI STY ESTKL,X ; RETURN INT COUNT STA ESTKH,X RTS @@ -159,7 +158,6 @@ end for rom = $C100 to $C700 step $0100 if rom->5 == $38 and rom->7 == $18 and rom->11 == $01 and rom->12 == $20 puts("Found Mouse in slot #"); putc('0' + ((rom >> 8) & $07)); putln - puts("Service IRQ: $"); puth(@serviceMouse); putln // // Hook mouse IRQ handler into ProDOS IRQ chain // diff --git a/src/samplesrc/mousetest.pla b/src/samplesrc/mousetest.pla index 9a33ec9..610638d 100644 --- a/src/samplesrc/mousetest.pla +++ b/src/samplesrc/mousetest.pla @@ -1,11 +1,23 @@ include "inc/cmdsys.plh" +include "inc/conio.plh" include "inc/mouse.plh" var count +var xPos, yPos, bttn -Mouse:setMouse(VBL_INT_ENABLE) -while count < 100 and ^$C000 < 128 - count = count + Mouse:chkVBL() - puti(count); putln +Mouse:clampMouse(0, 39, 0, 23) +//Mouse:setMouse(VBL_INT_ENABLE|MOVE_INT_ENABLE|BUTTON_INT_ENABLE|MOUSE_ENABLE) +Mouse:setMouse(MOVE_INT_ENABLE|BUTTON_INT_ENABLE|MOUSE_ENABLE) +while ^$C000 < 128 + if Mouse:chkMouse() + conio:gotoxy(xPos, yPos); putc(' ') + xPos, yPos, bttn = Mouse:readMouse()#3 + conio:gotoxy(xPos, yPos); putc(bttn & BUTTON_DOWN ?? '+' :: '^') + fin + if Mouse:chkVBL() + ^$400++ + fin loop +getc +Mouse:detachMouse() done From d539ff5b49243cc63712cbc087ab55c67e6e99a5 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 28 Apr 2018 19:44:43 -0700 Subject: [PATCH 60/74] Add more files to tftp release batch file --- src/tftprel | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/tftprel b/src/tftprel index dffe642..cd0891e 100755 --- a/src/tftprel +++ b/src/tftprel @@ -15,6 +15,7 @@ echo "SYS/ARGS"; atftp $1 --put -l rel/ARGS#FE1000 -r $2/SYS/ARGS#FE1000 echo "SYS/DHCP"; atftp $1 --put -l rel/DHCP#FE1000 -r $2/SYS/DHCP#FE1000 echo "SYS/ED"; atftp $1 --put -l rel/ED#FE1000 -r $2/SYS/ED#FE1000 echo "SYS/ETHERIP"; atftp $1 --put -l rel/ETHERIP#FE1000 -r $2/SYS/ETHERIP#FE1000 +echo "SYS/MOUSE"; atftp $1 --put -l rel/apple/MOUSE#FE1000 -r $2/SYS/MOUSE#FE1000 echo "SYS/FIBER"; atftp $1 --put -l rel/FIBER#FE1000 -r $2/SYS/FIBER#FE1000 echo "SYS/FPSTR"; atftp $1 --put -l rel/FPSTR#FE1000 -r $2/SYS/FPSTR#FE1000 echo "SYS/FPU"; atftp $1 --put -l rel/FPU#FE1000 -r $2/SYS/FPU#FE1000 @@ -37,3 +38,25 @@ echo "SYS/UTHERNET"; atftp $1 --put -l rel/apple/UTHERNET#FE1000 -r $2/SYS/UTHER # Build tools echo "BLD/PLASM"; atftp $1 --put -l rel/PLASM#FE1000 -r $2/BLD/PLASM#FE1000 echo "BLD/CODEOPT"; atftp $1 --put -l rel/CODEOPT#FE1000 -r $2/BLD/CODEOPT#FE1000 + +echo "INC/ARGS.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/args.plh -r $2/BLD/INC/ARGS.PLH#040000 +echo "INC/CMDSYS.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/cmdsys.plh -r $2/BLD/INC/CMDSYS.PLH#040000 +echo "INC/CONIO.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/conio.plh -r $2/BLD/INC/CONIO.PLH#040000 +echo "INC/DGR.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/dgr.plh -r $2/BLD/INC/DGR.PLH#040000 +echo "INC/FIBER.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/fiber.plh -r $2/BLD/INC/FIBER.PLH#040000 +echo "INC/FILEIO.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/fileio.plh -r $2/BLD/INC/FILEIO.PLH#040000 +echo "INC/FPSTR.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/fpstr.plh -r $2/BLD/INC/FPSTR.PLH#040000 +echo "INC/FPU.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/fpu.plh -r $2/BLD/INC/FPU.PLH#040000 +echo "INC/GRAFIX.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/grafix.plh -r $2/BLD/INC/GRAFIX.PLH#040000 +echo "INC/INET.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/inet.plh -r $2/BLD/INC/INET.PLH#040000 +echo "INC/JOYBUZZ.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/joybuzz.plh -r $2/BLD/INC/JOYBUZZ.PLH#040000 +echo "INC/LONGJUMP.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/longjmp.plh -r $2/BLD/INC/LONGJUMP.PLH#040000 +echo "INC/LZ4.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/lz4.plh -r $2/BLD/INC/LZ4.PLH#040000 +echo "INC/MEMMGR.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/memmgr.plh -r $2/BLD/INC/MEMMGR.PLH#040000 +echo "INC/MOUSE.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/mouse.plh -r $2/BLD/INC/MOUSE.PLH#040000 +echo "INC/PORTIO.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/portio.plh -r $2/BLD/INC/PORTIO.PLH#040000 +echo "INC/SANE.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/sane.plh -r $2/BLD/INC/SANE.PLH#040000 +echo "INC/SDFAT.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/sdfat.plh -r $2/BLD/INC/SDFAT.PLH#040000 +echo "INC/SNDSEQ.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/sndseq.plh -r $2/BLD/INC/SNDSEQ.PLH#040000 +echo "INC/SPIPORT.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/spiport.plh -r $2/BLD/INC/SPIPORT.PLH#040000 +echo "INC/TESTLIB.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/testlib.plh -r $2/BLD/INC/TESTLIB.PLH#040000 From 2f5bb106bd506235ad46acaa0902d4acfaf87a09 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sun, 29 Apr 2018 07:15:56 -0700 Subject: [PATCH 61/74] Break out TFTP copies --- src/tftpbld | 32 ++++++++++++++++++++++++++++++++ src/tftpdemos | 4 ++++ src/{tftprel => tftpsys} | 38 ++++---------------------------------- 3 files changed, 40 insertions(+), 34 deletions(-) create mode 100644 src/tftpbld create mode 100644 src/tftpdemos rename src/{tftprel => tftpsys} (50%) diff --git a/src/tftpbld b/src/tftpbld new file mode 100644 index 0000000..b3abd80 --- /dev/null +++ b/src/tftpbld @@ -0,0 +1,32 @@ +#!/bin/bash + +# Build tools +echo "BLD/PLASM"; atftp $1 --put -l rel/PLASM#FE1000 -r $2/BLD/PLASM#FE1000 +echo "BLD/CODEOPT"; atftp $1 --put -l rel/CODEOPT#FE1000 -r $2/BLD/CODEOPT#FE1000 + +#Build incs +echo "INC/ARGS.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/args.plh -r $2/BLD/INC/ARGS.PLH#040000 +echo "INC/CMDSYS.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/cmdsys.plh -r $2/BLD/INC/CMDSYS.PLH#040000 +echo "INC/CONIO.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/conio.plh -r $2/BLD/INC/CONIO.PLH#040000 +echo "INC/DGR.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/dgr.plh -r $2/BLD/INC/DGR.PLH#040000 +echo "INC/FIBER.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/fiber.plh -r $2/BLD/INC/FIBER.PLH#040000 +echo "INC/FILEIO.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/fileio.plh -r $2/BLD/INC/FILEIO.PLH#040000 +echo "INC/FPSTR.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/fpstr.plh -r $2/BLD/INC/FPSTR.PLH#040000 +echo "INC/FPU.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/fpu.plh -r $2/BLD/INC/FPU.PLH#040000 +echo "INC/GRAFIX.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/grafix.plh -r $2/BLD/INC/GRAFIX.PLH#040000 +echo "INC/INET.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/inet.plh -r $2/BLD/INC/INET.PLH#040000 +echo "INC/JOYBUZZ.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/joybuzz.plh -r $2/BLD/INC/JOYBUZZ.PLH#040000 +echo "INC/LONGJUMP.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/longjmp.plh -r $2/BLD/INC/LONGJUMP.PLH#040000 +echo "INC/LZ4.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/lz4.plh -r $2/BLD/INC/LZ4.PLH#040000 +echo "INC/MEMMGR.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/memmgr.plh -r $2/BLD/INC/MEMMGR.PLH#040000 +echo "INC/MOUSE.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/mouse.plh -r $2/BLD/INC/MOUSE.PLH#040000 +echo "INC/PORTIO.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/portio.plh -r $2/BLD/INC/PORTIO.PLH#040000 +echo "INC/SANE.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/sane.plh -r $2/BLD/INC/SANE.PLH#040000 +echo "INC/SDFAT.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/sdfat.plh -r $2/BLD/INC/SDFAT.PLH#040000 +echo "INC/SNDSEQ.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/sndseq.plh -r $2/BLD/INC/SNDSEQ.PLH#040000 +echo "INC/SPIPORT.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/spiport.plh -r $2/BLD/INC/SPIPORT.PLH#040000 +echo "INC/TESTLIB.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/testlib.plh -r $2/BLD/INC/TESTLIB.PLH#040000 + +# Sample source +echo "BLD/MOUSETEST.PLA"; atftp $1 --option "mode netascii" --put -l src/mousetest.pla -r $2/BLD/MOUSETEST.PLA#040000 +echo "BLD/HTTPD.PLA"; atftp $1 --option "mode netascii" --put -l src/httpd.pla -r $2/BLD/HTTPD.PLA#040000 diff --git a/src/tftpdemos b/src/tftpdemos new file mode 100644 index 0000000..c6fe200 --- /dev/null +++ b/src/tftpdemos @@ -0,0 +1,4 @@ +#!/bin/bash + +# Net demos +echo "NET/TFTPD"; atftp $1 --put -l rel/TFTPD#FE1000 -r $2/DEMOS/NET/TFTPD#FE1000 diff --git a/src/tftprel b/src/tftpsys similarity index 50% rename from src/tftprel rename to src/tftpsys index cd0891e..2cfe772 100755 --- a/src/tftprel +++ b/src/tftpsys @@ -1,44 +1,11 @@ #!/bin/bash -# Core VM, CMDSYS, JITC files -echo "PLASMA.SYSTEM"; atftp $1 --put -l rel/apple/PLASMA.SYSTEM#FF2000 -r $2/PLASMA.SYSTEM#FF2000 -echo "PLVM.128"; atftp $1 --put -l rel/apple/PLVM.128#FF2000 -r $2/PLVM.128#FF2000 -echo "PLVM16"; atftp $1 --put -l rel/apple/PLVM16#FF2000 -r $2/PLVM16#FF2000 -echo "CMD"; atftp $1 --put -l rel/apple/CMD#061000 -r $2/CMD#061000 -echo "CMD128"; atftp $1 --put -l rel/apple/CMD128#061000 -r $2/CMD128#061000 -echo "SYS/JIT"; atftp $1 --put -l rel/apple/JIT#FE1000 -r $2/SYS/JIT#FE1000 -echo "SYS/JIT16"; atftp $1 --put -l rel/apple/JIT16#FE1000 -r $2/SYS/JIT16#FE1000 -echo "SYS/JITUNE"; atftp $1 --put -l rel/apple/JITUNE#FE1000 -r $2/SYS/JITUNE#FE1000 - -# Core libraries -echo "SYS/ARGS"; atftp $1 --put -l rel/ARGS#FE1000 -r $2/SYS/ARGS#FE1000 -echo "SYS/DHCP"; atftp $1 --put -l rel/DHCP#FE1000 -r $2/SYS/DHCP#FE1000 -echo "SYS/ED"; atftp $1 --put -l rel/ED#FE1000 -r $2/SYS/ED#FE1000 -echo "SYS/ETHERIP"; atftp $1 --put -l rel/ETHERIP#FE1000 -r $2/SYS/ETHERIP#FE1000 -echo "SYS/MOUSE"; atftp $1 --put -l rel/apple/MOUSE#FE1000 -r $2/SYS/MOUSE#FE1000 -echo "SYS/FIBER"; atftp $1 --put -l rel/FIBER#FE1000 -r $2/SYS/FIBER#FE1000 -echo "SYS/FPSTR"; atftp $1 --put -l rel/FPSTR#FE1000 -r $2/SYS/FPSTR#FE1000 -echo "SYS/FPU"; atftp $1 --put -l rel/FPU#FE1000 -r $2/SYS/FPU#FE1000 -echo "SYS/INET"; atftp $1 --put -l rel/INET#FE1000 -r $2/SYS/INET#FE1000 -echo "SYS/LONGJUMP"; atftp $1 --put -l rel/LONGJMP#FE1000 -r $2/SYS/LONGJMP#FE1000 -echo "SYS/LZ4"; atftp $1 --put -l rel/LZ4#FE1000 -r $2/SYS/LZ4#FE1000 -echo "SYS/MEMMGR"; atftp $1 --put -l rel/MEMMGR#FE1000 -r $2/SYS/MEMMGR#FE1000 -echo "SYS/SANE"; atftp $1 --put -l rel/SANE#FE1000 -r $2/SYS/SANE#FE1000 -echo "SYS/CONIO"; atftp $1 --put -l rel/apple/CONIO#FE1000 -r $2/SYS/CONIO#FE1000 -echo "SYS/DGR"; atftp $1 --put -l rel/apple/DGR#FE1000 -r $2/SYS/DGR#FE1000 -echo "SYS/FILEIO"; atftp $1 --put -l rel/apple/FILEIO#FE1000 -r $2/SYS/FILEIO#FE1000 -echo "SYS/GRAFIX"; atftp $1 --put -l rel/apple/GRAFIX#FE1000 -r $2/SYS/GRAFIX#FE1000 -echo "SYS/JOYBUZZ"; atftp $1 --put -l rel/apple/JOYBUZZ#FE1000 -r $2/SYS/JOYBUZZ#FE1000 -echo "SYS/MON"; atftp $1 --put -l rel/apple/MON#FE1000 -r $2/SYS/MON#FE1000 -echo "SYS/PORTIO"; atftp $1 --put -l rel/apple/PORTIO#FE1000 -r $2/SYS/PORTIO#FE1000 -echo "SYS/SPIPORT"; atftp $1 --put -l rel/apple/SPIPORT#FE1000 -r $2/SYS/SPIPORT#FE1000 -echo "SYS/UTHERNET2";atftp $1 --put -l rel/apple/UTHERNET2#FE1000 -r $2/SYS/UTHERNET2#FE1000 -echo "SYS/UTHERNET"; atftp $1 --put -l rel/apple/UTHERNET#FE1000 -r $2/SYS/UTHERNET#FE1000 # Build tools echo "BLD/PLASM"; atftp $1 --put -l rel/PLASM#FE1000 -r $2/BLD/PLASM#FE1000 echo "BLD/CODEOPT"; atftp $1 --put -l rel/CODEOPT#FE1000 -r $2/BLD/CODEOPT#FE1000 +#Build incs echo "INC/ARGS.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/args.plh -r $2/BLD/INC/ARGS.PLH#040000 echo "INC/CMDSYS.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/cmdsys.plh -r $2/BLD/INC/CMDSYS.PLH#040000 echo "INC/CONIO.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/conio.plh -r $2/BLD/INC/CONIO.PLH#040000 @@ -60,3 +27,6 @@ echo "INC/SDFAT.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/sdfa echo "INC/SNDSEQ.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/sndseq.plh -r $2/BLD/INC/SNDSEQ.PLH#040000 echo "INC/SPIPORT.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/spiport.plh -r $2/BLD/INC/SPIPORT.PLH#040000 echo "INC/TESTLIB.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/testlib.plh -r $2/BLD/INC/TESTLIB.PLH#040000 + +# Sample source +echo "BLD/MOUSETEST.PLA"; atftp $1 --option "mode netsacii" --put -l src/mousetest.pla -r $2/BLD/MOUSETEST.PLA#040000 From b1143a2b7eae94096a285dfb2765b69d490d168c Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sun, 29 Apr 2018 07:19:48 -0700 Subject: [PATCH 62/74] Fix writing xlated data to disk --- src/samplesrc/tftpd.pla | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/samplesrc/tftpd.pla b/src/samplesrc/tftpd.pla index d5f7a50..ea0746c 100644 --- a/src/samplesrc/tftpd.pla +++ b/src/samplesrc/tftpd.pla @@ -229,7 +229,7 @@ def writeUDP(ipsrc, portsrc, data, len, param) fin len = len - t_datPkt if netscii - xlat($0A, $0D, buff+datBytes, len) + xlat($0A, $0D, data+datBytes, len) fin if fileio:write(ref, data+datBytes, len) <> len puts("WRQ: File write error\n") From 1ced9b1a1acc4c4ddf1216bfedc38e875a20d8ce Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sun, 29 Apr 2018 08:07:35 -0700 Subject: [PATCH 63/74] fix paths and execute bits for batchfiles --- src/tftpbld | 46 +++++++++++++++++++------------------- src/tftpdemos | 0 src/tftpsys | 62 +++++++++++++++++++++++++++------------------------ 3 files changed, 56 insertions(+), 52 deletions(-) mode change 100644 => 100755 src/tftpbld mode change 100644 => 100755 src/tftpdemos diff --git a/src/tftpbld b/src/tftpbld old mode 100644 new mode 100755 index b3abd80..c240e46 --- a/src/tftpbld +++ b/src/tftpbld @@ -5,28 +5,28 @@ echo "BLD/PLASM"; atftp $1 --put -l rel/PLASM#FE1000 -r $2/BLD/PLASM#FE1000 echo "BLD/CODEOPT"; atftp $1 --put -l rel/CODEOPT#FE1000 -r $2/BLD/CODEOPT#FE1000 #Build incs -echo "INC/ARGS.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/args.plh -r $2/BLD/INC/ARGS.PLH#040000 -echo "INC/CMDSYS.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/cmdsys.plh -r $2/BLD/INC/CMDSYS.PLH#040000 -echo "INC/CONIO.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/conio.plh -r $2/BLD/INC/CONIO.PLH#040000 -echo "INC/DGR.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/dgr.plh -r $2/BLD/INC/DGR.PLH#040000 -echo "INC/FIBER.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/fiber.plh -r $2/BLD/INC/FIBER.PLH#040000 -echo "INC/FILEIO.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/fileio.plh -r $2/BLD/INC/FILEIO.PLH#040000 -echo "INC/FPSTR.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/fpstr.plh -r $2/BLD/INC/FPSTR.PLH#040000 -echo "INC/FPU.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/fpu.plh -r $2/BLD/INC/FPU.PLH#040000 -echo "INC/GRAFIX.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/grafix.plh -r $2/BLD/INC/GRAFIX.PLH#040000 -echo "INC/INET.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/inet.plh -r $2/BLD/INC/INET.PLH#040000 -echo "INC/JOYBUZZ.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/joybuzz.plh -r $2/BLD/INC/JOYBUZZ.PLH#040000 -echo "INC/LONGJUMP.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/longjmp.plh -r $2/BLD/INC/LONGJUMP.PLH#040000 -echo "INC/LZ4.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/lz4.plh -r $2/BLD/INC/LZ4.PLH#040000 -echo "INC/MEMMGR.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/memmgr.plh -r $2/BLD/INC/MEMMGR.PLH#040000 -echo "INC/MOUSE.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/mouse.plh -r $2/BLD/INC/MOUSE.PLH#040000 -echo "INC/PORTIO.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/portio.plh -r $2/BLD/INC/PORTIO.PLH#040000 -echo "INC/SANE.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/sane.plh -r $2/BLD/INC/SANE.PLH#040000 -echo "INC/SDFAT.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/sdfat.plh -r $2/BLD/INC/SDFAT.PLH#040000 -echo "INC/SNDSEQ.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/sndseq.plh -r $2/BLD/INC/SNDSEQ.PLH#040000 -echo "INC/SPIPORT.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/spiport.plh -r $2/BLD/INC/SPIPORT.PLH#040000 -echo "INC/TESTLIB.PLH"; atftp $1 --option "mode netascii" --put -l src/inc/testlib.plh -r $2/BLD/INC/TESTLIB.PLH#040000 +echo "BLD/INC/ARGS.PLH"; atftp $1 --option "mode netascii" --put -l inc/args.plh -r $2/BLD/INC/ARGS.PLH#040000 +echo "BLD/INC/CMDSYS.PLH"; atftp $1 --option "mode netascii" --put -l inc/cmdsys.plh -r $2/BLD/INC/CMDSYS.PLH#040000 +echo "BLD/INC/CONIO.PLH"; atftp $1 --option "mode netascii" --put -l inc/conio.plh -r $2/BLD/INC/CONIO.PLH#040000 +echo "BLD/INC/DGR.PLH"; atftp $1 --option "mode netascii" --put -l inc/dgr.plh -r $2/BLD/INC/DGR.PLH#040000 +echo "BLD/INC/FIBER.PLH"; atftp $1 --option "mode netascii" --put -l inc/fiber.plh -r $2/BLD/INC/FIBER.PLH#040000 +echo "BLD/INC/FILEIO.PLH"; atftp $1 --option "mode netascii" --put -l inc/fileio.plh -r $2/BLD/INC/FILEIO.PLH#040000 +echo "BLD/INC/FPSTR.PLH"; atftp $1 --option "mode netascii" --put -l inc/fpstr.plh -r $2/BLD/INC/FPSTR.PLH#040000 +echo "BLD/INC/FPU.PLH"; atftp $1 --option "mode netascii" --put -l inc/fpu.plh -r $2/BLD/INC/FPU.PLH#040000 +echo "BLD/INC/GRAFIX.PLH"; atftp $1 --option "mode netascii" --put -l inc/grafix.plh -r $2/BLD/INC/GRAFIX.PLH#040000 +echo "BLD/INC/INET.PLH"; atftp $1 --option "mode netascii" --put -l inc/inet.plh -r $2/BLD/INC/INET.PLH#040000 +echo "BLD/INC/JOYBUZZ.PLH"; atftp $1 --option "mode netascii" --put -l inc/joybuzz.plh -r $2/BLD/INC/JOYBUZZ.PLH#040000 +echo "BLD/INC/LONGJUMP.PLH"; atftp $1 --option "mode netascii" --put -l inc/longjmp.plh -r $2/BLD/INC/LONGJUMP.PLH#040000 +echo "BLD/INC/LZ4.PLH"; atftp $1 --option "mode netascii" --put -l inc/lz4.plh -r $2/BLD/INC/LZ4.PLH#040000 +echo "BLD/INC/MEMMGR.PLH"; atftp $1 --option "mode netascii" --put -l inc/memmgr.plh -r $2/BLD/INC/MEMMGR.PLH#040000 +echo "BLD/INC/MOUSE.PLH"; atftp $1 --option "mode netascii" --put -l inc/mouse.plh -r $2/BLD/INC/MOUSE.PLH#040000 +echo "BLD/INC/PORTIO.PLH"; atftp $1 --option "mode netascii" --put -l inc/portio.plh -r $2/BLD/INC/PORTIO.PLH#040000 +echo "BLD/INC/SANE.PLH"; atftp $1 --option "mode netascii" --put -l inc/sane.plh -r $2/BLD/INC/SANE.PLH#040000 +echo "BLD/INC/SDFAT.PLH"; atftp $1 --option "mode netascii" --put -l inc/sdfat.plh -r $2/BLD/INC/SDFAT.PLH#040000 +echo "BLD/INC/SNDSEQ.PLH"; atftp $1 --option "mode netascii" --put -l inc/sndseq.plh -r $2/BLD/INC/SNDSEQ.PLH#040000 +echo "BLD/INC/SPIPORT.PLH"; atftp $1 --option "mode netascii" --put -l inc/spiport.plh -r $2/BLD/INC/SPIPORT.PLH#040000 +echo "BLD/INC/TESTLIB.PLH"; atftp $1 --option "mode netascii" --put -l inc/testlib.plh -r $2/BLD/INC/TESTLIB.PLH#040000 # Sample source -echo "BLD/MOUSETEST.PLA"; atftp $1 --option "mode netascii" --put -l src/mousetest.pla -r $2/BLD/MOUSETEST.PLA#040000 -echo "BLD/HTTPD.PLA"; atftp $1 --option "mode netascii" --put -l src/httpd.pla -r $2/BLD/HTTPD.PLA#040000 +echo "BLD/MOUSETEST.PLA"; atftp $1 --option "mode netascii" --put -l samplesrc/mousetest.pla -r $2/BLD/MOUSETEST.PLA#040000 +echo "BLD/HTTPD.PLA"; atftp $1 --option "mode netascii" --put -l samplesrc/httpd.pla -r $2/BLD/HTTPD.PLA#040000 diff --git a/src/tftpdemos b/src/tftpdemos old mode 100644 new mode 100755 diff --git a/src/tftpsys b/src/tftpsys index 2cfe772..e4db851 100755 --- a/src/tftpsys +++ b/src/tftpsys @@ -1,32 +1,36 @@ #!/bin/bash +# Core VM, CMDSYS, JITC files +echo "PLASMA.SYSTEM"; atftp $1 --put -l rel/apple/PLASMA.SYSTEM#FF2000 -r $2/PLASMA.SYSTEM#FF2000 +echo "PLVM.128"; atftp $1 --put -l rel/apple/PLVM.128#FF2000 -r $2/PLVM.128#FF2000 +echo "PLVM16"; atftp $1 --put -l rel/apple/PLVM16#FF2000 -r $2/PLVM16#FF2000 +echo "CMD"; atftp $1 --put -l rel/apple/CMD#061000 -r $2/CMD#061000 +echo "CMD128"; atftp $1 --put -l rel/apple/CMD128#061000 -r $2/CMD128#061000 +echo "SYS/JIT"; atftp $1 --put -l rel/apple/JIT#FE1000 -r $2/SYS/JIT#FE1000 +echo "SYS/JIT16"; atftp $1 --put -l rel/apple/JIT16#FE1000 -r $2/SYS/JIT16#FE1000 +echo "SYS/JITUNE"; atftp $1 --put -l rel/apple/JITUNE#FE1000 -r $2/SYS/JITUNE#FE1000 -# Build tools -echo "BLD/PLASM"; atftp $1 --put -l rel/PLASM#FE1000 -r $2/BLD/PLASM#FE1000 -echo "BLD/CODEOPT"; atftp $1 --put -l rel/CODEOPT#FE1000 -r $2/BLD/CODEOPT#FE1000 - -#Build incs -echo "INC/ARGS.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/args.plh -r $2/BLD/INC/ARGS.PLH#040000 -echo "INC/CMDSYS.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/cmdsys.plh -r $2/BLD/INC/CMDSYS.PLH#040000 -echo "INC/CONIO.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/conio.plh -r $2/BLD/INC/CONIO.PLH#040000 -echo "INC/DGR.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/dgr.plh -r $2/BLD/INC/DGR.PLH#040000 -echo "INC/FIBER.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/fiber.plh -r $2/BLD/INC/FIBER.PLH#040000 -echo "INC/FILEIO.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/fileio.plh -r $2/BLD/INC/FILEIO.PLH#040000 -echo "INC/FPSTR.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/fpstr.plh -r $2/BLD/INC/FPSTR.PLH#040000 -echo "INC/FPU.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/fpu.plh -r $2/BLD/INC/FPU.PLH#040000 -echo "INC/GRAFIX.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/grafix.plh -r $2/BLD/INC/GRAFIX.PLH#040000 -echo "INC/INET.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/inet.plh -r $2/BLD/INC/INET.PLH#040000 -echo "INC/JOYBUZZ.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/joybuzz.plh -r $2/BLD/INC/JOYBUZZ.PLH#040000 -echo "INC/LONGJUMP.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/longjmp.plh -r $2/BLD/INC/LONGJUMP.PLH#040000 -echo "INC/LZ4.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/lz4.plh -r $2/BLD/INC/LZ4.PLH#040000 -echo "INC/MEMMGR.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/memmgr.plh -r $2/BLD/INC/MEMMGR.PLH#040000 -echo "INC/MOUSE.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/mouse.plh -r $2/BLD/INC/MOUSE.PLH#040000 -echo "INC/PORTIO.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/portio.plh -r $2/BLD/INC/PORTIO.PLH#040000 -echo "INC/SANE.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/sane.plh -r $2/BLD/INC/SANE.PLH#040000 -echo "INC/SDFAT.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/sdfat.plh -r $2/BLD/INC/SDFAT.PLH#040000 -echo "INC/SNDSEQ.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/sndseq.plh -r $2/BLD/INC/SNDSEQ.PLH#040000 -echo "INC/SPIPORT.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/spiport.plh -r $2/BLD/INC/SPIPORT.PLH#040000 -echo "INC/TESTLIB.PLH"; atftp $1 --option "mode netsacii" --put -l src/inc/testlib.plh -r $2/BLD/INC/TESTLIB.PLH#040000 - -# Sample source -echo "BLD/MOUSETEST.PLA"; atftp $1 --option "mode netsacii" --put -l src/mousetest.pla -r $2/BLD/MOUSETEST.PLA#040000 +# Core libraries +echo "SYS/ARGS"; atftp $1 --put -l rel/ARGS#FE1000 -r $2/SYS/ARGS#FE1000 +echo "SYS/DHCP"; atftp $1 --put -l rel/DHCP#FE1000 -r $2/SYS/DHCP#FE1000 +echo "SYS/ED"; atftp $1 --put -l rel/ED#FE1000 -r $2/SYS/ED#FE1000 +echo "SYS/ETHERIP"; atftp $1 --put -l rel/ETHERIP#FE1000 -r $2/SYS/ETHERIP#FE1000 +echo "SYS/MOUSE"; atftp $1 --put -l rel/apple/MOUSE#FE1000 -r $2/SYS/MOUSE#FE1000 +echo "SYS/FIBER"; atftp $1 --put -l rel/FIBER#FE1000 -r $2/SYS/FIBER#FE1000 +echo "SYS/FPSTR"; atftp $1 --put -l rel/FPSTR#FE1000 -r $2/SYS/FPSTR#FE1000 +echo "SYS/FPU"; atftp $1 --put -l rel/FPU#FE1000 -r $2/SYS/FPU#FE1000 +echo "SYS/INET"; atftp $1 --put -l rel/INET#FE1000 -r $2/SYS/INET#FE1000 +echo "SYS/LONGJUMP"; atftp $1 --put -l rel/LONGJMP#FE1000 -r $2/SYS/LONGJMP#FE1000 +echo "SYS/LZ4"; atftp $1 --put -l rel/LZ4#FE1000 -r $2/SYS/LZ4#FE1000 +echo "SYS/MEMMGR"; atftp $1 --put -l rel/MEMMGR#FE1000 -r $2/SYS/MEMMGR#FE1000 +echo "SYS/SANE"; atftp $1 --put -l rel/SANE#FE1000 -r $2/SYS/SANE#FE1000 +echo "SYS/CONIO"; atftp $1 --put -l rel/apple/CONIO#FE1000 -r $2/SYS/CONIO#FE1000 +echo "SYS/DGR"; atftp $1 --put -l rel/apple/DGR#FE1000 -r $2/SYS/DGR#FE1000 +echo "SYS/FILEIO"; atftp $1 --put -l rel/apple/FILEIO#FE1000 -r $2/SYS/FILEIO#FE1000 +echo "SYS/GRAFIX"; atftp $1 --put -l rel/apple/GRAFIX#FE1000 -r $2/SYS/GRAFIX#FE1000 +echo "SYS/JOYBUZZ"; atftp $1 --put -l rel/apple/JOYBUZZ#FE1000 -r $2/SYS/JOYBUZZ#FE1000 +echo "SYS/MON"; atftp $1 --put -l rel/apple/MON#FE1000 -r $2/SYS/MON#FE1000 +echo "SYS/PORTIO"; atftp $1 --put -l rel/apple/PORTIO#FE1000 -r $2/SYS/PORTIO#FE1000 +echo "SYS/SPIPORT"; atftp $1 --put -l rel/apple/SPIPORT#FE1000 -r $2/SYS/SPIPORT#FE1000 +echo "SYS/UTHERNET2";atftp $1 --put -l rel/apple/UTHERNET2#FE1000 -r $2/SYS/UTHERNET2#FE1000 +echo "SYS/UTHERNET"; atftp $1 --put -l rel/apple/UTHERNET#FE1000 -r $2/SYS/UTHERNET#FE1000 From d7e0873c109cadc5087ccbe85b40b687d5fede78 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sun, 29 Apr 2018 14:47:44 -0700 Subject: [PATCH 64/74] Change text file EOL strategy --- src/samplesrc/tftpd.pla | 12 +++++++--- src/tftpbld | 49 +++++++++++++++++++++-------------------- 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/src/samplesrc/tftpd.pla b/src/samplesrc/tftpd.pla index ea0746c..f73c113 100644 --- a/src/samplesrc/tftpd.pla +++ b/src/samplesrc/tftpd.pla @@ -191,7 +191,7 @@ def readUDP(ipsrc, portsrc, data, len, param) fin if param == 512 // Size of initial read param = fileio:read(ref, buff+datBytes, 512) - if netscii + if type == $04 // TXT type xlat($0D, $0A, buff+datBytes, param) fin block++ @@ -228,7 +228,7 @@ def writeUDP(ipsrc, portsrc, data, len, param) break fin len = len - t_datPkt - if netscii + if type == $04 // TXT type xlat($0A, $0D, data+datBytes, len) fin if fileio:write(ref, data+datBytes, len) <> len @@ -259,6 +259,8 @@ def writeUDP(ipsrc, portsrc, data, len, param) return 0 end def servUDP(ipsrc, portsrc, data, len, param) + byte info[24] + when *data is RRQ // Read request // @@ -284,12 +286,16 @@ def servUDP(ipsrc, portsrc, data, len, param) iNet:sendUDP(portTFTP, ipsrc, portsrc, @tftpError, t_errPkt) return 0 fin + info.0 = $0A + info:1 = @filename + syscall($C4, @info) + type = info.4 puts("Reading file: "); puts(@filename); putln TID = (TID + TID_INC) | $1000 block = 1 buff=>datBlock = swab(block) len = fileio:read(ref, buff+datBytes, 512) - if netscii + if type == $04 // TXT type xlat($0D, $0A, buff+datBytes, 512) fin portTID = iNet:openUDP(TID, @readUDP, len) diff --git a/src/tftpbld b/src/tftpbld index c240e46..4acd1b0 100755 --- a/src/tftpbld +++ b/src/tftpbld @@ -1,32 +1,33 @@ #!/bin/bash # Build tools -echo "BLD/PLASM"; atftp $1 --put -l rel/PLASM#FE1000 -r $2/BLD/PLASM#FE1000 +echo "BLD/PLASM"; atftp $1 --put -l rel/PLASM#FE1000 -r $2/BLD/PLASM#FE1000 echo "BLD/CODEOPT"; atftp $1 --put -l rel/CODEOPT#FE1000 -r $2/BLD/CODEOPT#FE1000 #Build incs -echo "BLD/INC/ARGS.PLH"; atftp $1 --option "mode netascii" --put -l inc/args.plh -r $2/BLD/INC/ARGS.PLH#040000 -echo "BLD/INC/CMDSYS.PLH"; atftp $1 --option "mode netascii" --put -l inc/cmdsys.plh -r $2/BLD/INC/CMDSYS.PLH#040000 -echo "BLD/INC/CONIO.PLH"; atftp $1 --option "mode netascii" --put -l inc/conio.plh -r $2/BLD/INC/CONIO.PLH#040000 -echo "BLD/INC/DGR.PLH"; atftp $1 --option "mode netascii" --put -l inc/dgr.plh -r $2/BLD/INC/DGR.PLH#040000 -echo "BLD/INC/FIBER.PLH"; atftp $1 --option "mode netascii" --put -l inc/fiber.plh -r $2/BLD/INC/FIBER.PLH#040000 -echo "BLD/INC/FILEIO.PLH"; atftp $1 --option "mode netascii" --put -l inc/fileio.plh -r $2/BLD/INC/FILEIO.PLH#040000 -echo "BLD/INC/FPSTR.PLH"; atftp $1 --option "mode netascii" --put -l inc/fpstr.plh -r $2/BLD/INC/FPSTR.PLH#040000 -echo "BLD/INC/FPU.PLH"; atftp $1 --option "mode netascii" --put -l inc/fpu.plh -r $2/BLD/INC/FPU.PLH#040000 -echo "BLD/INC/GRAFIX.PLH"; atftp $1 --option "mode netascii" --put -l inc/grafix.plh -r $2/BLD/INC/GRAFIX.PLH#040000 -echo "BLD/INC/INET.PLH"; atftp $1 --option "mode netascii" --put -l inc/inet.plh -r $2/BLD/INC/INET.PLH#040000 -echo "BLD/INC/JOYBUZZ.PLH"; atftp $1 --option "mode netascii" --put -l inc/joybuzz.plh -r $2/BLD/INC/JOYBUZZ.PLH#040000 -echo "BLD/INC/LONGJUMP.PLH"; atftp $1 --option "mode netascii" --put -l inc/longjmp.plh -r $2/BLD/INC/LONGJUMP.PLH#040000 -echo "BLD/INC/LZ4.PLH"; atftp $1 --option "mode netascii" --put -l inc/lz4.plh -r $2/BLD/INC/LZ4.PLH#040000 -echo "BLD/INC/MEMMGR.PLH"; atftp $1 --option "mode netascii" --put -l inc/memmgr.plh -r $2/BLD/INC/MEMMGR.PLH#040000 -echo "BLD/INC/MOUSE.PLH"; atftp $1 --option "mode netascii" --put -l inc/mouse.plh -r $2/BLD/INC/MOUSE.PLH#040000 -echo "BLD/INC/PORTIO.PLH"; atftp $1 --option "mode netascii" --put -l inc/portio.plh -r $2/BLD/INC/PORTIO.PLH#040000 -echo "BLD/INC/SANE.PLH"; atftp $1 --option "mode netascii" --put -l inc/sane.plh -r $2/BLD/INC/SANE.PLH#040000 -echo "BLD/INC/SDFAT.PLH"; atftp $1 --option "mode netascii" --put -l inc/sdfat.plh -r $2/BLD/INC/SDFAT.PLH#040000 -echo "BLD/INC/SNDSEQ.PLH"; atftp $1 --option "mode netascii" --put -l inc/sndseq.plh -r $2/BLD/INC/SNDSEQ.PLH#040000 -echo "BLD/INC/SPIPORT.PLH"; atftp $1 --option "mode netascii" --put -l inc/spiport.plh -r $2/BLD/INC/SPIPORT.PLH#040000 -echo "BLD/INC/TESTLIB.PLH"; atftp $1 --option "mode netascii" --put -l inc/testlib.plh -r $2/BLD/INC/TESTLIB.PLH#040000 +echo "BLD/INC/ARGS.PLH"; atftp $1 --put -l inc/args.plh -r $2/BLD/INC/ARGS.PLH#040000 +echo "BLD/INC/CMDSYS.PLH"; atftp $1 --put -l inc/cmdsys.plh -r $2/BLD/INC/CMDSYS.PLH#040000 +echo "BLD/INC/CONIO.PLH"; atftp $1 --put -l inc/conio.plh -r $2/BLD/INC/CONIO.PLH#040000 +echo "BLD/INC/DGR.PLH"; atftp $1 --put -l inc/dgr.plh -r $2/BLD/INC/DGR.PLH#040000 +echo "BLD/INC/FIBER.PLH"; atftp $1 --put -l inc/fiber.plh -r $2/BLD/INC/FIBER.PLH#040000 +echo "BLD/INC/FILEIO.PLH"; atftp $1 --put -l inc/fileio.plh -r $2/BLD/INC/FILEIO.PLH#040000 +echo "BLD/INC/FPSTR.PLH"; atftp $1 --put -l inc/fpstr.plh -r $2/BLD/INC/FPSTR.PLH#040000 +echo "BLD/INC/FPU.PLH"; atftp $1 --put -l inc/fpu.plh -r $2/BLD/INC/FPU.PLH#040000 +echo "BLD/INC/GRAFIX.PLH"; atftp $1 --put -l inc/grafix.plh -r $2/BLD/INC/GRAFIX.PLH#040000 +echo "BLD/INC/INET.PLH"; atftp $1 --put -l inc/inet.plh -r $2/BLD/INC/INET.PLH#040000 +echo "BLD/INC/JOYBUZZ.PLH"; atftp $1 --put -l inc/joybuzz.plh -r $2/BLD/INC/JOYBUZZ.PLH#040000 +echo "BLD/INC/LONGJUMP.PLH"; atftp $1 --put -l inc/longjmp.plh -r $2/BLD/INC/LONGJUMP.PLH#040000 +echo "BLD/INC/LZ4.PLH"; atftp $1 --put -l inc/lz4.plh -r $2/BLD/INC/LZ4.PLH#040000 +echo "BLD/INC/MEMMGR.PLH"; atftp $1 --put -l inc/memmgr.plh -r $2/BLD/INC/MEMMGR.PLH#040000 +echo "BLD/INC/MOUSE.PLH"; atftp $1 --put -l inc/mouse.plh -r $2/BLD/INC/MOUSE.PLH#040000 +echo "BLD/INC/PORTIO.PLH"; atftp $1 --put -l inc/portio.plh -r $2/BLD/INC/PORTIO.PLH#040000 +echo "BLD/INC/SANE.PLH"; atftp $1 --put -l inc/sane.plh -r $2/BLD/INC/SANE.PLH#040000 +echo "BLD/INC/SDFAT.PLH"; atftp $1 --put -l inc/sdfat.plh -r $2/BLD/INC/SDFAT.PLH#040000 +echo "BLD/INC/SNDSEQ.PLH"; atftp $1 --put -l inc/sndseq.plh -r $2/BLD/INC/SNDSEQ.PLH#040000 +echo "BLD/INC/SPIPORT.PLH"; atftp $1 --put -l inc/spiport.plh -r $2/BLD/INC/SPIPORT.PLH#040000 +echo "BLD/INC/TESTLIB.PLH"; atftp $1 --put -l inc/testlib.plh -r $2/BLD/INC/TESTLIB.PLH#040000 # Sample source -echo "BLD/MOUSETEST.PLA"; atftp $1 --option "mode netascii" --put -l samplesrc/mousetest.pla -r $2/BLD/MOUSETEST.PLA#040000 -echo "BLD/HTTPD.PLA"; atftp $1 --option "mode netascii" --put -l samplesrc/httpd.pla -r $2/BLD/HTTPD.PLA#040000 +echo "BLD/MOUSETEST.PLA"; atftp $1 --put -l samplesrc/mousetest.pla -r $2/BLD/MOUSETEST.PLA#040000 +echo "BLD/HTTPD.PLA"; atftp $1 --put -l samplesrc/httpd.pla -r $2/BLD/HTTPD.PLA#040000 +echo "BLD/LZ4CAT.PLA"; atftp $1 --put -l samplesrc/lz4cat.pla -r $2/BLD/LZ4CAT.PLA#040000 From 20756214e2d89bf15d7467f1407f288189a9c80b Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sun, 29 Apr 2018 16:52:05 -0700 Subject: [PATCH 65/74] Update portable VM to current VM ops --- src/vmsrc/plvm.c | 153 +++++++++++++++++++++++++---------------------- 1 file changed, 80 insertions(+), 73 deletions(-) diff --git a/src/vmsrc/plvm.c b/src/vmsrc/plvm.c index 64a3764..c636fab 100755 --- a/src/vmsrc/plvm.c +++ b/src/vmsrc/plvm.c @@ -526,7 +526,7 @@ void call(uword pc) * OPTBL DW CN,CN,CN,CN,CN,CN,CN,CN ; 00 02 04 06 08 0A 0C 0E DW CN,CN,CN,CN,CN,CN,CN,CN ; 10 12 14 16 18 1A 1C 1E - DW MINUS1,NEXTOP,NEXTOP,LA,LLA,CB,CW,CS ; 20 22 24 26 28 2A 2C 2E + DW MINUS1,BREQ,BRNE,LA,LLA,CB,CW,CS ; 20 22 24 26 28 2A 2C 2E DW DROP,DROP2,DUP,DIVMOD,ADDI,SUBI,ANDI,ORI ; 30 32 34 36 38 3A 3C 3E DW ISEQ,ISNE,ISGT,ISLT,ISGE,ISLE,BRFLS,BRTRU ; 40 42 44 46 48 4A 4C 4E DW BRNCH,SEL,CALL,ICAL,ENTER,LEAVE,RET,CFFB ; 50 52 54 56 58 5A 5C 5E @@ -535,10 +535,11 @@ OPTBL DW CN,CN,CN,CN,CN,CN,CN,CN ; 00 02 04 06 DW LNOT,ADD,SUB,MUL,DIV,MOD,INCR,DECR ; 80 82 84 86 88 8A 8C 8E DW NEG,COMP,BAND,IOR,XOR,SHL,SHR,IDXW ; 90 92 94 96 98 9A 9C 9E DW BRGT,BRLT,INCBRLE,ADDBRLE,DECBRGE,SUBBRGE,BRAND,BROR ; A0 A2 A4 A6 A8 AA AC AE + DW ADDLB,ADDLW,ADDAB,ADDAW,IDXLB,IDXLW,IDXAB,IDXAW ; B0 B2 B4 B6 B8 BA BC BE */ void interp(code *ip) { - int val, ea, frmsz, parmcnt, nybble; + int val, ea, frmsz, parmcnt; code *previp = ip; while (1) @@ -558,7 +559,6 @@ void interp(code *ip) printf("]\n"); gets(cmdline); } - nybble = 15; previp = ip; switch (*ip++) { @@ -566,53 +566,42 @@ void interp(code *ip) * 0x00-0x1F */ case 0x00: - nybble--; case 0x02: - nybble--; case 0x04: - nybble--; case 0x06: - nybble--; case 0x08: - nybble--; case 0x0A: - nybble--; case 0x0C: - nybble--; case 0x0E: - nybble--; case 0x10: - nybble--; case 0x12: - nybble--; case 0x14: - nybble--; case 0x16: - nybble--; case 0x18: - nybble--; case 0x1A: - nybble--; case 0x1C: - nybble--; case 0x1E: - PUSH(nybble); + PUSH(*previp/2); break; /* * 0x20-0x2F */ - case 0x20: // NOT : TOS = !TOS - TOS = !TOS; + case 0x20: // MINUS 1 : TOS = -1 + PUSH(-1); break; - case 0x22: // LOR : TOS = TOS || TOS-1 + case 0x22: // BREQ val = POP; - ea = POP; - PUSH(ea || val); + if (val == POP) + ip += WORD_PTR(ip) ; + else + ip += 2; break; - case 0x24: // LAND : TOS = TOS && TOS-1 + case 0x24: // BRNE val = POP; - ea = POP; - PUSH(ea && val); + if (val != POP) + ip += WORD_PTR(ip) ; + else + ip += 2; break; case 0x26: // LA : TOS = @VAR ; equivalent to CW ADDRESSOF(VAR) PUSH(WORD_PTR(ip)); @@ -640,7 +629,7 @@ void interp(code *ip) case 0x30: // DROP : TOS = POP; break; - case 0x32: // DROP2 : TOS == + case 0x32: // DROP2 : TOS =, TOS = POP; POP; break; @@ -728,7 +717,7 @@ void interp(code *ip) { ip += 2; ip += WORD_PTR(ip); - parmcnt = 0; + break; } else ip += 4; @@ -745,7 +734,6 @@ void interp(code *ip) case 0x58: // ENTER : NEW FRAME, FOREACH PARAM LOCALVAR = TOS frmsz = BYTE_PTR(ip); ip++; - PHA(frmsz); if (show_state) printf("< $%04X: $%04X > ", fp - frmsz, fp); fp -= frmsz; @@ -763,7 +751,7 @@ void interp(code *ip) printf("\n"); break; case 0x5A: // LEAVE : DEL FRAME, IP = TOFP - fp += PLA; + fp += BYTE_PTR(ip); case 0x5C: // RET : IP = TOFP return; case 0x5E: // CFFB : TOS = CONSTANTBYTE(IP) | 0xFF00 @@ -801,6 +789,7 @@ void interp(code *ip) break; case 0x6C: // DLB : TOS = TOS, LOCALBYTE [IP] = TOS mem_data[TO_UWORD(fp + BYTE_PTR(ip))] = TOS; + TOS = TOS & 0xFF; ip++; break; case 0x6E: // DLW : TOS = TOS, LOCALWORD [IP] = TOS @@ -847,6 +836,7 @@ void interp(code *ip) break; case 0x7C: // DAB : TOS = TOS, BYTE (IP) = TOS mem_data[UWORD_PTR(ip)] = TOS; + TOS = TOS & 0xFF; ip += 2; break; case 0x7E: // DAW : TOS = TOS, WORD (IP) = TOS @@ -855,11 +845,11 @@ void interp(code *ip) mem_data[ea + 1] = TOS >> 8; ip += 2; break; - /* - * 0x080-0x08F - */ - case 0x80: // ZERO : TOS = 0 - PUSH(0); + /* + * 0x080-0x08F + */ + case 0x80: // NOT : TOS = !TOS + TOS = !TOS; break; case 0x82: // ADD : TOS = TOS + TOS-1 val = POP; @@ -931,92 +921,62 @@ void interp(code *ip) ea = POP; PUSH(ea + val * 2); break; - /* + /* * 0xA0-0xAF */ case 0xA0: // BRGT : TOS-1 > TOS ? IP += (IP) val = POP; if (TOS < val) - { - POP; ip += WORD_PTR(ip); - } else - { - PUSH(val); ip += 2; - } + PUSH(val); break; case 0xA2: // BRLT : TOS-1 < TOS ? IP += (IP) val = POP; if (TOS > val) - { - POP; ip += WORD_PTR(ip); - } else - { - PUSH(val); ip += 2; - } + PUSH(val); break; case 0xA4: // INCBRLE : TOS = TOS + 1 val = POP; val++; if (TOS >= val) - { - PUSH(val); ip += WORD_PTR(ip); - } else - { - POP; ip += 2; - } + PUSH(val); break; case 0xA6: // ADDBRLE : TOS = TOS + TOS-1 val = POP; ea = POP; val = ea + val; if (TOS >= val) - { - PUSH(val); ip += WORD_PTR(ip); - } else - { - POP; ip += 2; - } + PUSH(val); break; case 0xA8: // DECBRGE : TOS = TOS - 1 val = POP; val--; if (TOS <= val) - { - PUSH(val); ip += WORD_PTR(ip); - } else - { - POP; ip += 2; - } + PUSH(val); break; case 0xAA: // SUBBRGE : TOS = TOS-1 - TOS val = POP; ea = POP; val = ea - val; if (TOS <= val) - { - PUSH(val); ip += WORD_PTR(ip); - } else - { - POP; ip += 2; - } + PUSH(val); break; case 0xAC: // BRAND : SHORT CIRCUIT AND if (TOS) // EVALUATE RIGHT HAND OF AND @@ -1040,6 +1000,53 @@ void interp(code *ip) ip += WORD_PTR(ip); } break; + /* + * 0xB0-0xBF + */ + case 0xB0: // ADDLB : TOS = TOS + LOCALBYTE[IP] + val = POP + mem_data[TO_UWORD(fp + BYTE_PTR(ip))]; + PUSH(val); + ip++; + break; + case 0xB2: // ADDLW : TOS = TOS + LOCALWORD[IP] + ea = TO_UWORD(fp + BYTE_PTR(ip)); + val = POP + (mem_data[ea] | (mem_data[ea + 1] << 8)); + PUSH(val); + ip++; + break; + case 0xB4: // ADDAB : TOS = TOS + BYTE[IP] + val = POP + mem_data[UWORD_PTR(ip)]; + PUSH(val); + ip += 2; + break; + case 0xB6: // ADDAW : TOS = TOS + WORD[IP] + ea = UWORD_PTR(ip); + val = POP + (mem_data[ea] | (mem_data[ea + 1] << 8)); + PUSH(val); + ip += 2; + break; + case 0xB8: // IDXLB : TOS = TOS + LOCALBYTE[IP]*2 + val = POP + mem_data[TO_UWORD(fp + BYTE_PTR(ip))] * 2; + PUSH(val); + ip++; + break; + case 0xBA: // IDXLW : TOS = TOS + LOCALWORD[IP]*2 + ea = TO_UWORD(fp + BYTE_PTR(ip)); + val = POP + (mem_data[ea] | (mem_data[ea + 1] << 8)) * 2; + PUSH(val); + ip++; + break; + case 0xBC: // IDXAB : TOS = TOS + BYTE[IP]*2 + val = POP + mem_data[UWORD_PTR(ip)] * 2; + PUSH(val); + ip += 2; + break; + case 0xBE: // IDXAW : TOS = TOS + WORD[IP]*2 + ea = UWORD_PTR(ip); + val = POP + (mem_data[ea] | (mem_data[ea + 1] << 8)) * 2; + PUSH(val); + ip += 2; + break; /* * Odd codes and everything else are errors. */ From 7d076e809fdfd5c1872b245d142679eacdd8c0a0 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sun, 29 Apr 2018 19:20:13 -0700 Subject: [PATCH 66/74] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a4e4db4..95f129f 100755 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# 3/13/2018 PLASMA 1.1 Available! -[Download and read the Release Notes](https://github.com/dschmenk/PLASMA/blob/master/doc/Version%201.1.md) +# 4/29/2018 PLASMA 1.2 Available! +[Download and read the Release Notes](https://github.com/dschmenk/PLASMA/blob/master/doc/Version%201.2.md) # The PLASMA Programming Language From bd3d3dbb6f7d475e9e457e93e34f6ac96756f3e5 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sun, 29 Apr 2018 19:21:08 -0700 Subject: [PATCH 67/74] Update version --- doc/{Version 1.1.md => Version 1.2.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/{Version 1.1.md => Version 1.2.md} (100%) diff --git a/doc/Version 1.1.md b/doc/Version 1.2.md similarity index 100% rename from doc/Version 1.1.md rename to doc/Version 1.2.md From c04c57487e109fc6c2235ee1b140ba9bd8c15f1c Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sun, 29 Apr 2018 19:24:01 -0700 Subject: [PATCH 68/74] Update Version 1.2.md --- doc/Version 1.2.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/doc/Version 1.2.md b/doc/Version 1.2.md index 2ea7ca2..2716022 100644 --- a/doc/Version 1.2.md +++ b/doc/Version 1.2.md @@ -1,16 +1,16 @@ -# PLASMA Version 1.1 +# PLASMA Version 1.2 Welcome to PLASMA: the Grand Unifying Platform for the Apple 1, ][, and ///. Download the four disk images (three if you don't plan to boot an Apple ///): -[PLASMA 1.1 System and ProDOS Boot](https://github.com/dschmenk/PLASMA/blob/ver-1/PLASMA-SYS1.PO?raw=true) +[PLASMA 1.2 System and ProDOS Boot](https://github.com/dschmenk/PLASMA/blob/ver-1/PLASMA-SYS1.PO?raw=true) -[PLASMA 1.1 Build Tools](https://github.com/dschmenk/PLASMA/blob/ver-1/PLASMA-BLD1.PO?raw=true) +[PLASMA 1.2 Build Tools](https://github.com/dschmenk/PLASMA/blob/ver-1/PLASMA-BLD1.PO?raw=true) -[PLASMA 1.1 Demos](https://github.com/dschmenk/PLASMA/blob/ver-1/PLASMA-DEM1.PO?raw=true) +[PLASMA 1.2 Demos](https://github.com/dschmenk/PLASMA/blob/ver-1/PLASMA-DEM1.PO?raw=true) -[PLASMA 1.1 Apple /// SOS Boot ](https://github.com/dschmenk/PLASMA/blob/ver-1/PLASMA-SOS1.PO?raw=true) +[PLASMA 1.2 Apple /// SOS Boot ](https://github.com/dschmenk/PLASMA/blob/ver-1/PLASMA-SOS1.PO?raw=true) PLASMA can be run from floppies, System in Drive 1, and Build or Demos in Drive 2. Mass storage is the recommended installation that looks like (replacing HARDISK with your volume name of choice): @@ -98,6 +98,16 @@ There is a [YouTube playlist](https://www.youtube.com/playlist?list=PLlPKgUMQbJ7 - The documentation is sparse and incomplete. Yep, could use your help... +# Changes in PLASMA for 1.2 + +1. Add TFTPD TFTP server + +2. Fix Uthernet 1 driver + +3. Add mouse module + +4. Fix IRQ issues for interrupt driven mouse driver + # Changes in PLASMA for 1.1 1. All known bugs are fixed From cdc51a5ba8e15aea0dbe703b0fcc05b294a37d74 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Tue, 1 May 2018 07:33:33 -0700 Subject: [PATCH 69/74] Rework disk images --- PLASMA-BLD2.PO | Bin 143360 -> 143360 bytes PLASMA-DEM2.PO | Bin 143360 -> 143360 bytes PLASMA-SOS2.PO => PLASMA-FPSOS.PO | Bin 143360 -> 143360 bytes PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes src/mkrel | 32 ++++++++++++++++-------------- 5 files changed, 17 insertions(+), 15 deletions(-) rename PLASMA-SOS2.PO => PLASMA-FPSOS.PO (80%) diff --git a/PLASMA-BLD2.PO b/PLASMA-BLD2.PO index 6f19f1e5b45c36971f02e96bbf042db22612c3dc..3fb592976fe1a5d3273a6c7643a0e437a439aa4b 100644 GIT binary patch delta 3944 zcmeHJTX0iV6g}tUl!m53q@`_2(F-jkX-glpVku&qHfbBoizF?yJZhSTw$L^;NugC{ z!WZL*gQL-@e#i^~;{!pY2#SalQ1S8M_yBRn5ycsQ)bTMgj!1EzdvlYU+~ODhnUCb0 zd)8iS?|t^(H@mJVcU@5)SwhQl(JWMeOIr-?W`n!JVKE@~p-M!No1%Rs1)0U@D&iLr z2Q3WmD=8A66lD@r<~F(97ITwmNt=)YWsp=ufLTpehD^Xrz~7i5gE<|xW`m_U0W+f< z^jNV3wiX;BNZ;mmJB%U<+}()gplcclj)#@EwK}UMvUDp1dr6rJi+D0}!hVF&R-Af3 zkk)CJh=9yP5S&Gk4qF0Qb6NSk@n6#+RE73#OowTk?M9Q`;TD0@2T&$@T*Y8vF{LcH ze5>7-3=LFY2IpqWoI?assFOs;chbV1&bk%HY7Vnt-juxYHS~W{H>l|3-!PP0WWiE%=VRy2YXk##{ zhH#FhMICYE71pLSp$chQ%uObzXaW$zz@kwV=IJNU~NqXKnsDbMOxnqkdJus zb9xrQ$#v-o9H`I&Rw}~G5i(Z9B0;b4esYInQswr-<+osC&>+-k0*u8PN{0AMb-1rz{k zr2sxv-Bx>t$;fe-i>&qJggcrn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-Z^>NK$A^lYnY2*JA8&|e zOzAjW3*!!ja?0#4{~Di1EGuSKWW5D-|J$)z3%Z(b)`GsA#Z_BTcl7gsF*^N5sY!q8 z?XkXb`I)-Hw6HB-urg;xrxGg`S-sp`mg!YI z)wm9*jLH{A8dt?@8_nqQI_H2U6Qlc@>wx-dMtXBnWi$oGxEYE5_0jMQ7*j4|8G7?8 z{qqA8U9GkL(^_juRefIWwiOhtt&f^b(-t=_jX7t)=Hmd?xDKEKn=~t@+D7I5($yBC zjv_BzOy+GXg6rTWxC8Ei$EbV4LgFR#Yw!-^j~EXj{zOzYlA2a3 z@(`;uCTldWjA$NVX(U#IwO~DR8?}(wu2Dj?W14y5R2aHJ~05p zR}8+RU@-Z4cahTH6&U0CfRB%Sz<;mrao5GK!)JL=>F*6}$+7l~<;sZH`QUpjuDC8{ zH%*M0E6v!9%+)7$lsr_e=H8H=J~*@g8cwd8Cd3;StuV7j8a_>4dQy<<>~?PEenUBH HsFQyK7Op$# diff --git a/PLASMA-SOS2.PO b/PLASMA-FPSOS.PO similarity index 80% rename from PLASMA-SOS2.PO rename to PLASMA-FPSOS.PO index 62312d5e571e741f594563105eae5da485966bc4..cf84e21555ad558a9e00fd13f46e99112a90dee2 100644 GIT binary patch delta 23949 zcmch<3w#qr_cy-TY_hva_L5DS4NxE;q_mV;6|sOyk&6Wb_CZ8M)QY7KARr=E#mlxp zYsIFvA_9-1wbIf6!2(t(*CK)xMI)f7h*m@_3KErahyK5_NeXy*e!u_wc|ULAo0&Ot zX6DS9Gq>H7{qGpoKV@*{9k<^x&(1iznS7LMp=|PHd^%gwAm5;2P|@uJBbAz`QFe;*w6e)WQ!LdLLojm0 zrTQ*Dk3MW>TG{jnOLZTd+3WgFsn@pFXZBMHMRjiFi&QtyZr)bK7-%DBv92*#E*Ppf zgPFF8h+i~R$p%_WW9jh}RqYU|Uh39eAME++j_nN}Z)>=n+8kHyXsdQmy=qGIv#r`z zrKm#l9JZWWWnOfOE|O1AST>>B&((KZm@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/apple/SNDSEQ#FE1000 prodos/sys/SNDSEQ.REL cp rel/apple/JIT#FE1000 prodos/sys/JIT.REL cp rel/apple/JIT16#FE1000 prodos/sys/JIT16.REL cp rel/apple/JITUNE#FE1000 prodos/sys/JITUNE.REL -cp rel/FPSTR#FE1000 prodos/sys/FPSTR.REL -cp rel/FPU#FE1000 prodos/sys/FPU.REL -cp rel/SANE#FE1000 prodos/sys/SANE.REL -cp ../sysfiles/FP6502.CODE#060000 prodos/sys/FP6502.CODE.BIN -cp ../sysfiles/ELEMS.CODE#060000 prodos/sys/ELEMS.CODE.BIN cp rel/LZ4#FE1000 prodos/sys/LZ4.REL +#cp rel/FPSTR#FE1000 prodos/sys/FPSTR.REL +#cp rel/FPU#FE1000 prodos/sys/FPU.REL +#cp rel/SANE#FE1000 prodos/sys/SANE.REL +#cp ../sysfiles/FP6502.CODE#060000 prodos/sys/FP6502.CODE.BIN +#cp ../sysfiles/ELEMS.CODE#060000 prodos/sys/ELEMS.CODE.BIN -rm -rf prodos/sos -mkdir prodos/sos -cp rel/apple/SOS.INTERP#050000 prodos/sos/SOS.INTERP.\$05 -cp rel/apple/SOS.CMD#FE1000 prodos/sos/SOS.CMD.REL +rm -rf prodos/fpsos +mkdir prodos/fpsos +cp rel/apple/SOS.INTERP#050000 prodos/fpsos/SOS.INTERP.\$05 +cp rel/apple/SOS.CMD#FE1000 prodos/fpsos/SOS.CMD.REL -mkdir prodos/sos/sys -cp rel/apple/SOS#FE1000 prodos/sos/sys/SOS.REL -cp rel/apple/GRAFIX#FE1000 prodos/sos/sys/GRAFIX.REL +mkdir prodos/fpsos/sys +cp rel/apple/SOS#FE1000 prodos/fpsos/sys/SOS.REL +cp rel/apple/GRAFIX#FE1000 prodos/fpsos/sys/GRAFIX.REL +cp rel/FPSTR#FE1000 prodos/fpsos/sys/FPSTR.REL +cp rel/FPU#FE1000 prodos/fpsos/sys/FPU.REL +cp rel/SANE#FE1000 prodos/fpsos/sys/SANE.REL +cp ../sysfiles/FP6502.CODE#060000 prodos/fpsos/sys/FP6502.CODE.BIN +cp ../sysfiles/ELEMS.CODE#060000 prodos/fpsos/sys/ELEMS.CODE.BIN rm -rf prodos/demos mkdir prodos/demos @@ -99,9 +104,6 @@ cp samplesrc/playseq.pla prodos/bld/PLAYSEQ.PLA.TXT cp samplesrc/rpncalc.pla prodos/bld/RPNCALC.PLA.TXT cp samplesrc/httpd.pla prodos/bld/HTTPD.PLA.TXT cp samplesrc/fatcat.pla prodos/bld/FATCAT.PLA.TXT -cp samplesrc/rogue.pla prodos/bld/ROGUE.PLA.TXT -cp samplesrc/rogue.map.pla prodos/bld/ROGUE.MAP.PLA.TXT -cp samplesrc/rogue.combat.pla prodos/bld/ROGUE.COMBAT.PLA.TXT cp samplesrc/gfxdemo.pla prodos/bld/GFXDEMO.PLA.TXT cp samplesrc/lz4cat.pla prodos/bld/LZ4CAT.PLA.TXT From 09246e0e40e087a4ba0b4caa27399e1655999c8c Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Tue, 1 May 2018 07:36:11 -0700 Subject: [PATCH 70/74] Update images --- PLASMA-DEM2.PO | Bin 143360 -> 143360 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/PLASMA-DEM2.PO b/PLASMA-DEM2.PO index 543a51e07a935cf1a2a0234dca9206e82e8117b5..de3ceeb01db011c52d787f2adf60a5157ea6323a 100644 GIT binary patch delta 1601 zcmZvce@t6d6vxl&yYJoCc9fDKIMTin$_TJYAZ2kQ5vkHKLZ#3lQ;eCLvm((gBMU9C ztz0o^_J`Tsi(|=x$#gDaNM;~rMl&--Og8Z+>av-c`77BnW1@ffkJ|ZdSy#H)EfJf3aW~1 zSOL}QXry(8h*IrP#TBS>W!8;5Ro?}>y27ErZDC=@|J=1n^R68D3C+7I*OS{U#TK8{ zO+)cpK3A1vIpxN^R>b8EWplP= z`YBeVIq%&*TDLjavn|@*6KdVsk#3u+CPoWd{=27|vx8*LeN+ooG!$&TC8AV4RP*^N z?!zFfmDv`vD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Fl~^0#|Vfy=#RlX@jmc!a>6MM9AtEM;z2Irki(1SKh(YKfFaqM>Wgt*{1^y$5AD9UyK7{xP zgFXjen2!9?^vG{8@C=%l!3yf<&49dWGVu@ezv#P;`WkAwMZyAJkPnK$eHKaEvPBv6 zHV^_kz)q|;SOM`UbSrcOdQSpL4|o>zV{rhBW6&>waWDZU!4zt*VyJ|E6U-og+p^`N z#pDUgktZ#W{K_)Kw^%=oz9qyzEGGU!yn>!Ja07ie(Wi4mcsPkXkSO9Li+Mm+awe*w zw{s?I&`^isW1t1Jfp*Y|`feT&`=EQE55V^>`j2t1oa2W46!{9~TtMw2`hG>c#0$h_ z^k0R(hWd3Lq#w_pJKOFzQc(pGMXEOOo$~9I^W#o&>K~oX{G+#?pXr>3sty0$5pDi0 zXFzjif|i!)P5s0(5lhQ?SSF}E>~_21s?1YG>B0m(5RJ6# bcJH_-`968+hr%2ipGdzflOFB3N8j=vYB_qn From fcfb971df3991cc37742f639e23ae64e1d89337f Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Wed, 2 May 2018 13:13:58 -0700 Subject: [PATCH 71/74] Generate mouse event when button status changes --- src/libsrc/apple/mouse.pla | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/src/libsrc/apple/mouse.pla b/src/libsrc/apple/mouse.pla index e80de1d..5e05de6 100644 --- a/src/libsrc/apple/mouse.pla +++ b/src/libsrc/apple/mouse.pla @@ -8,7 +8,7 @@ word rom byte params[] byte slot, index, page word setMouseFW -byte vblDiv, vblInt, mouInt +byte vblDiv, vblInt, mouInt, bttnPrev asm equates !SOURCE "vmsrc/plvmzp.inc" end @@ -18,10 +18,12 @@ end asm serviceMouse#0 VBLINT = $400 ; DUMMY VALUES TO BE FIXED-UP MOUINT = $401 +LASTBTTN= $402 CLD JSR $C400 - BCS MOUEX ; NOT MOUSE INT - LDY $0778+4 ; CHECK MOUSE INT CAUSE + BCC + + RTS ; NOT MOUSE INT ++ LDY $0778+4 ; CHECK MOUSE INT CAUSE TYA ; WAS IT VBL? AND #$08 BEQ + ; NOPE, MOVE OR BUTTON @@ -30,11 +32,18 @@ asm vblEvent INC VBLINT ; INC VBL EVENT + TYA ; MOUSE MOVE OR BUTTON ACTIVE AND #$86 - BNE + -MOUEX RTS +end +asm bttnEvent + EOR LASTBTTN + BEQ + end asm mouseEvent -+ INC MOUINT ; INC MOUSE EVENT + INC MOUINT ; INC MOUSE EVENT ++ TYA + AND #$80 +end +asm updateBttn + STA LASTBTTN end asm updateMouse LDX #$C4 @@ -176,9 +185,11 @@ for rom = $C100 to $C700 step $0100 // Fix-up IRQ routine // serviceMouse:2 = rom + rom->$13 // serveMouseFW - serviceMouse:7 = $0778+index + serviceMouse:8 = $0778+index vblEvent:1 = @vblInt + bttnEvent:1 = @bttnPrev mouseEvent:1 = @mouInt + updateBttn:1 = @bttnPrev updateMouse.1 = slot updateMouse.3 = page updateMouse:5 = rom + rom->$14 // readMouseFW @@ -190,7 +201,7 @@ next // // Not found // -rom = 0 +return -1 done What follows is the relevant parts to the mouse driver for VM02 From b34eed7de00a40c797af40bce5456e3c8c49b892 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Wed, 2 May 2018 13:27:08 -0700 Subject: [PATCH 72/74] Stop continuous events when mouse button pressed --- src/libsrc/apple/mouse.pla | 138 ++++++++++++++++++------------------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/src/libsrc/apple/mouse.pla b/src/libsrc/apple/mouse.pla index 5e05de6..27a8d87 100644 --- a/src/libsrc/apple/mouse.pla +++ b/src/libsrc/apple/mouse.pla @@ -31,7 +31,7 @@ end asm vblEvent INC VBLINT ; INC VBL EVENT + TYA ; MOUSE MOVE OR BUTTON ACTIVE - AND #$86 + AND #$82 end asm bttnEvent EOR LASTBTTN @@ -94,7 +94,7 @@ end def chkVblTimer byte count word msec - + msec = 0 count = chkEvt(@vblInt) while count @@ -243,37 +243,37 @@ CHKMOUSE: LDX #$20 ; LOOK FOR MOUSE ; EXIT: A = SLOT # :: C = 0 ; X = SLOT PAGE ; -SCAN_SLOTS: ORA #$C0 - STA TMPTR+1 - LDA #$00 - STA TMPTR -CHKSIG: LDY #$05 - LDA (TMPTR),Y - CMP #$38 ; LOOK FOR PASCAL COMPAT SIG - BNE :+ - LDY #$07 - LDA (TMPTR),Y - CMP #$18 - BNE :+ - LDY #$0B - LDA (TMPTR),Y - CMP #$01 - BNE :+ - LDY #$0C - TXA ; LOOK FOR MATCHING ID - CMP (TMPTR),Y - BNE :+ - LDA TMPTR+1 - TAX - AND #$07 - CLC - RTS -: INC TMPTR+1 - LDA TMPTR+1 - CMP #$C8 - BCC CHKSIG - SEC - RTS +SCAN_SLOTS: ORA #$C0 + STA TMPTR+1 + LDA #$00 + STA TMPTR +CHKSIG: LDY #$05 + LDA (TMPTR),Y + CMP #$38 ; LOOK FOR PASCAL COMPAT SIG + BNE :+ + LDY #$07 + LDA (TMPTR),Y + CMP #$18 + BNE :+ + LDY #$0B + LDA (TMPTR),Y + CMP #$01 + BNE :+ + LDY #$0C + TXA ; LOOK FOR MATCHING ID + CMP (TMPTR),Y + BNE :+ + LDA TMPTR+1 + TAX + AND #$07 + CLC + RTS +: INC TMPTR+1 + LDA TMPTR+1 + CMP #$C8 + BCC CHKSIG + SEC + RTS ;* ;* TURN VBL INTS ON AFTER INIT @@ -300,48 +300,48 @@ CALLVBLPROC: JSR $0000 .ASCIIZ "VBlank timer active" NOVBL: RTS - JSR PRODOS - .BYTE $40 ; ALLOC INTERRUPT - .ADDR ALLOCINTPARMS -.IFDEF DEBUG - BCC :+ - JSR PUTSLN - .ASCIIZ "FAILED TO ALLOCATE INTERRUPT" + JSR PRODOS + .BYTE $40 ; ALLOC INTERRUPT + .ADDR ALLOCINTPARMS +.IFDEF DEBUG + BCC :+ + JSR PUTSLN + .ASCIIZ "FAILED TO ALLOCATE INTERRUPT" : .ENDIF - RTS -ALLOCINTPARMS: .BYTE $02 - .BYTE $00 ; INT NUM - .ADDR IO_INTERRUPT ; INT CODE + RTS +ALLOCINTPARMS: .BYTE $02 + .BYTE $00 ; INT NUM + .ADDR IO_INTERRUPT ; INT CODE ;* ;* I/O INTERRUPT ROUTINE ;* -IO_INTERRUPT: CLD - LDY #$02 ; SLOT #1 * 2 -FNDIRQPROC: LDA LINK_DEVIRQ+1,Y - BEQ NXTIRQPROC - STA CALLIRQPROC+2 - LDA LINK_DEVIRQ,Y - STA CALLIRQPROC+1 - TYA - LSR - PHA -CALLIRQPROC: JSR $0000 - BCS :+ - PLA - TAY - PHA - JSR THREAD_NOTIFYIO -: PLA - ASL - TAY -NXTIRQPROC: INY - INY - CPY #$10 - BCC FNDIRQPROC - CLC - RTS +IO_INTERRUPT: CLD + LDY #$02 ; SLOT #1 * 2 +FNDIRQPROC: LDA LINK_DEVIRQ+1,Y + BEQ NXTIRQPROC + STA CALLIRQPROC+2 + LDA LINK_DEVIRQ,Y + STA CALLIRQPROC+1 + TYA + LSR + PHA +CALLIRQPROC: JSR $0000 + BCS :+ + PLA + TAY + PHA + JSR THREAD_NOTIFYIO +: PLA + ASL + TAY +NXTIRQPROC: INY + INY + CPY #$10 + BCC FNDIRQPROC + CLC + RTS ;* ;* MOUSE DEVICE DRIVER From 4628eacb787871c58c2205234a7ffc4923f4eccb Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Wed, 2 May 2018 18:28:39 -0700 Subject: [PATCH 73/74] Update test to use VLB INT --- src/samplesrc/mousetest.pla | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/samplesrc/mousetest.pla b/src/samplesrc/mousetest.pla index 610638d..fe243e7 100644 --- a/src/samplesrc/mousetest.pla +++ b/src/samplesrc/mousetest.pla @@ -6,8 +6,7 @@ var count var xPos, yPos, bttn Mouse:clampMouse(0, 39, 0, 23) -//Mouse:setMouse(VBL_INT_ENABLE|MOVE_INT_ENABLE|BUTTON_INT_ENABLE|MOUSE_ENABLE) -Mouse:setMouse(MOVE_INT_ENABLE|BUTTON_INT_ENABLE|MOUSE_ENABLE) +Mouse:setMouse(VBL_INT_ENABLE|MOVE_INT_ENABLE|BUTTON_INT_ENABLE|MOUSE_ENABLE) while ^$C000 < 128 if Mouse:chkMouse() conio:gotoxy(xPos, yPos); putc(' ') From 92300ab18a82884cd635e7e8bda617eadb81f8d0 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Wed, 2 May 2018 18:31:48 -0700 Subject: [PATCH 74/74] update images --- PLASMA-BLD2.PO | Bin 143360 -> 143360 bytes PLASMA-SYS2.PO | Bin 143360 -> 143360 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/PLASMA-BLD2.PO b/PLASMA-BLD2.PO index 3fb592976fe1a5d3273a6c7643a0e437a439aa4b..02345b8405896d909d7e1c99bb942b21d1b9c18b 100644 GIT binary patch delta 86 zcmZp8z|ru4W5aPaRasyE&|udP*WeJn03SyN29|>ij12!785XI?3Mn%@W&krbzhTp1 oWi)7(FC!&p!@y}OCgZ@NS?WEFvqQd@=geff$ag7+X3n@p-K@ug6L*d>D zMPRh`1{*>|5~DD&G`cB;krzP(SvcnqCwLPC7T9gn4{ti~f$#G?a1Na0vM0IhdG(}? za|Vs<*}2K46kb?ec+^CazDIZya`yu;XXJzd6h$4%TR>zN;EwW`=<7*g zpBWt=8+KovT^CZjDovt8cT~C#dAU7mpEKF&X0wg0Ud9EMk0Z?-?c>OPj{14T!`(;s zgksidj+h(`>#0hkx8aZF;RA#p4ahi?T!d99!X|7(k3lj4SwlDE%!ve%N_Ar z36|k4yn`}S;WJU{8#&c?qleLNA;$zw zsCyV5V0efj4Uf=Sleyf^Y#Y!61ZT2(G{gT!R}h1~=gjD7XvvAqg4}rKM9% XBfm%oT10&z{?QVeWn-*5T@}H