• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Deriving a new dialect of Very Tiny Language from VTL-2 6800 version


Commit MetaInfo

Revisãoe16e8f4e35290c6305f6cb99a0f1c5107f444de9 (tree)
Hora2022-10-06 10:09:08
AutorJoel Matthew Rees <joel.rees@gmai...>
CommiterJoel Matthew Rees

Mensagem de Log

detour working out parameter and local discipline too far in advance

Mudança Sumário

Diff

--- a/VTL_6809_coco.asm
+++ b/VTL_6809_coco.asm
@@ -442,7 +442,7 @@ GOTIT
442442 * RSTRT LBRA START ; warm start over
443443 *
444444 PRNT PULU B ; PRINT DECIMAL
445-PRNT2 LDX #DECBUF ; CONVERT TO DECIMAL
445+PRNT2 LDX #DECBUF ; CONVERT TO DECIMAL ** fix this reference later
446446 STX CNVPTR
447447 LDX #PWRS10
448448 CVD1 PSHU X
@@ -643,31 +643,41 @@ PWRS10 FCB $27 ; 10000
643643 FCB $00 ; 1
644644 FCB $01
645645 *
646-DIVIDE CLR MLDVCT ; DEVIDE 16-BITS
647-GOT INC MLDVCT
648- ASL 1,X
649- ROL 0,X
646+* parameters (should prefer to use SET rather than EQU)
647+DIVSR EQU 3 ; divisor
648+DIVCT EQU 2 ; lead bit count
649+DIVQ EQU 0 ; quotient
650+DIVLOC EQU DIVCT+1
651+DIVIDE LEAU -DIVLOC,U
652+ CLR DIVCT,U ; DEVIDE 16-BITS
653+GOT INC DIVCT,U
654+ ASL DIVSR+1,U
655+ ROL DIVSR,U
650656 BCC GOT
651- ROR 0,X
652- ROR 1,X
653- CLR DIVQUO
654- CLR DIVQUO+1
655-DIV2 SUBD 0,X
657+ ROR DIVSR,U
658+ ROR DIVSR+1,U
659+ CLR DIVQ,U
660+ CLR DIVQ+1,U
661+DIV2 SUBD DIVSR,U
656662 BCC OK
657- ADDD 0,X
663+ ADDD DIVSR,U
658664 ANDCC #$FE
659665 BRA DIVNOC ; instead of the trick
660666 * The 6809 CMPX affects all relevant flags, can't use this trick.
661667 * And the op-codes are different in the 6809, too.
662668 * FCB $9C ; CMPX
663669 OK ORCC #$01
664-DIVNOC ROL DIVQUO+1
665- ROL DIVQUO
666- DEC MLDVCT
670+DIVNOC ROL DIVQ+1,U
671+ ROL DIVQ,U
672+ DEC DIVCT,U
667673 BEQ DONE
668- LSR 0,X
669- ROR 1,X
674+ LSR DIVSR,U
675+ ROR DIVSR+1,U
670676 BRA DIV2
677+DIVDUN LEAU DIVLOC,U
678+DONE ANDCC #$FE
679+ RTS
680+
671681 *
672682 TSTN LDB 0,X ; TEST FOR NUMERIC
673683 CMPB #$3A
@@ -675,9 +685,9 @@ TSTN LDB 0,X ; TEST FOR NUMERIC
675685 CMPB #'0
676686 BGE DONE
677687 NOTDEC ORCC #$01
678- RTS
679-DONE ANDCC #$FE
680688 DUN RTS
689+*DONE ANDCC #$FE
690+*DUN RTS
681691 *
682692 CVTLN BSR INLN
683693 *