From 4ad7bb1bf1a549e880413acef474cb93beaaf7ac Mon Sep 17 00:00:00 2001 From: d0p1 Date: Mon, 22 Apr 2024 11:02:09 +0200 Subject: [PATCH] tokipona encoding --- doc/isa.org | 44 +++++++++++++++++++++++++------------------- doc/tokipona.org | 19 +++++++++++++++++++ vm/res/fonts.bmp | Bin 0 -> 65674 bytes 3 files changed, 44 insertions(+), 19 deletions(-) create mode 100644 doc/tokipona.org create mode 100644 vm/res/fonts.bmp diff --git a/doc/isa.org b/doc/isa.org index dfca5bb..2e5e85c 100644 --- a/doc/isa.org +++ b/doc/isa.org @@ -36,6 +36,10 @@ Status register flags ** Control Registers +- CR0 :: +- CR1 :: +- CR2 :: Page directory + ** Exception ** Privileged Exception @@ -60,7 +64,6 @@ Status register flags *** 8 and 16 bit relative - A size and a literal operand is given immediately after the instruction. #+begin_src asm @@ -73,26 +76,27 @@ A size and a literal operand is given immediately after the instruction. *** Absolute Addressing + ** Opcodes | | -0 | -1 | -2 | -3 | -4 | -5 | -6 | -7 | -8 | -9 | -A | -B | -C | -D | -E | -F | |----+---------------+---------------+-----------+-----------+----+----+----+-----------+-------+---------------+---------+----+---------------+---------------+-----------+----| -| 0- | *BRK* /#byte/ | *ORA* /X,ind/ | | /prefix1/ | | | | /prefix1/ | *PHP* | *ORA* /#/ | *ASL* A | | | *ORA* /abs/ | ASL abs | | -| 1- | *BPL* /rel/ | *ORA* /ind,Y/ | | /prefix1/ | | | | /prefix1/ | *CLC* | *ORA* /abs,Y/ | | | | *ORA* /abs,X/ | ASL abs,X | | -| 2- | *JSR* /abs/ | *AND* /X,ind/ | | /prefix1/ | | | | /prefix1/ | *PLP* | *AND* /#/ | *ROL* A | | *BIT* /abs/ | *AND* /abs/ | ROL abs | | -| 3- | *BMI* /rel/ | *AND* /ind,Y/ | | /prefix1/ | | | | /prefix1/ | *SEC* | *AND* /abs,Y/ | | | | *AND* /abs,X/ | ROL abs,X | | -| 4- | *RTI* | *EOR* /X,ind/ | | /prefix1/ | | | | /prefix1/ | *PHA* | *EOR* /#/ | *LSR* A | | *JMP* /abs/ | *EOR* /abs/ | LSR abs | | -| 5- | *BVC* /rel/ | *EOR* /ind,Y/ | | /prefix1/ | | | | /prefix1/ | *CLI* | *EOR* /abs,Y/ | | | | *EOR* /abs,X/ | LSR abs,X | | -| 6- | *RTS* | *ADC* /X,ind/ | PER? | /prefix1/ | | | | /prefix1/ | *PLA* | *ADC* /#/ | *ROR* A | | *JMP* /ind/ | *ADC* /abs/ | ROR abs | | -| 7- | *BVS* /rel/ | *ADC* /ind,Y/ | | /prefix1/ | | | | /prefix1/ | *SEI* | *ADC* /abs,Y/ | | | | *ADC* /abs,X/ | ROR abs,X | | -| 8- | | *STA* /X,ind/ | | /prefix1/ | | | | /prefix1/ | *DEY* | | *TXA* | | *STY* /abs/ | *STA* /abs/ | STX abs | | +| 0- | *BRK* /#byte/ | *ORA* /X,ind/ | | /prefix1/ | | | | /prefix1/ | *PHP* | *ORA* /#/ | *ASL* A | | | *ORA* /abs/ | *ASL* abs | | +| 1- | *BPL* /rel/ | *ORA* /ind,Y/ | | /prefix1/ | | | | /prefix1/ | *CLC* | *ORA* /abs,Y/ | | | | *ORA* /abs,X/ | *ASL* abs,X | | +| 2- | *JSR* /abs/ | *AND* /X,ind/ | | /prefix1/ | | | | /prefix1/ | *PLP* | *AND* /#/ | *ROL* A | | *BIT* /abs/ | *AND* /abs/ | *ROL* abs | | +| 3- | *BMI* /rel/ | *AND* /ind,Y/ | | /prefix1/ | | | | /prefix1/ | *SEC* | *AND* /abs,Y/ | | | | *AND* /abs,X/ | *ROL* abs,X | | +| 4- | *RTI* | *EOR* /X,ind/ | | /prefix1/ | | | | /prefix1/ | *PHA* | *EOR* /#/ | *LSR* A | | *JMP* /abs/ | *EOR* /abs/ | *LSR* abs | | +| 5- | *BVC* /rel/ | *EOR* /ind,Y/ | | /prefix1/ | | | | /prefix1/ | *CLI* | *EOR* /abs,Y/ | | | | *EOR* /abs,X/ | *LSR* abs,X | | +| 6- | *RTS* | *ADC* /X,ind/ | PER? | /prefix1/ | | | | /prefix1/ | *PLA* | *ADC* /#/ | *ROR* A | | *JMP* /ind/ | *ADC* /abs/ | *ROR* abs | | +| 7- | *BVS* /rel/ | *ADC* /ind,Y/ | | /prefix1/ | | | | /prefix1/ | *SEI* | *ADC* /abs,Y/ | | | | *ADC* /abs,X/ | *ROR* abs,X | | +| 8- | *BR* /rel/ | *STA* /X,ind/ | | /prefix1/ | | | | /prefix1/ | *DEY* | | *TXA* | | *STY* /abs/ | *STA* /abs/ | *STX* abs | | | 9- | *BCC* /rel/ | *STA* /ind,Y/ | | /prefix1/ | | | | /prefix1/ | *TYA* | *STA* /abs,Y/ | *TXS* | | | *STA* /abs,X/ | | | -| A- | *LDY* /#/ | *LDA* /X,ind/ | *LDX* /#/ | /prefix1/ | | | | /prefix1/ | *TAY* | *LDA* /#/ | *TAX* | | *LDY* /abs/ | *LDA* /abs/ | LDX abs | | -| B- | *BCS* /rel/ | *LDA* /ind,Y/ | | /prefix1/ | | | | /prefix1/ | *CLV* | *LDA* /abs,Y/ | *TSX* | | *LDY* /abs,X/ | *LDA* /abs,X/ | LDX abs,Y | | -| C- | *CPY* /#/ | *CMP* /X,ind/ | | /prefix1/ | | | | /prefix1/ | *INY* | *CMP* /#/ | *DEX* | | *CPY* /abs/ | *CMP* /abs/ | DEC abs | | -| D- | *BNE* /rel/ | *CMP* /ind,Y/ | | /prefix1/ | | | | /prefix1/ | *CLD* | *CMP* /abs,Y/ | | | | *CMP* /abs,X/ | DEC abs,X | | -| E- | *CPX* /#/ | *SBC* /X,ind/ | | /prefix1/ | | | | /prefix1/ | *INX* | *SBC* /#/ | *NOP* | | *CPX* /abs/ | *SBC* /abs/ | INC abs | | -| F- | *BEQ* /rel/ | *SBC* /ind,Y/ | | /prefix1/ | | | | /prefix1/ | *SED* | *SBC* /abs,Y/ | | | | *SBC* /abs,X/ | INC abs,X | | +| A- | *LDY* /#/ | *LDA* /X,ind/ | *LDX* /#/ | /prefix1/ | | | | /prefix1/ | *TAY* | *LDA* /#/ | *TAX* | | *LDY* /abs/ | *LDA* /abs/ | *LDX* abs | | +| B- | *BCS* /rel/ | *LDA* /ind,Y/ | | /prefix1/ | | | | /prefix1/ | *CLV* | *LDA* /abs,Y/ | *TSX* | | *LDY* /abs,X/ | *LDA* /abs,X/ | *LDX* abs,Y | | +| C- | *CPY* /#/ | *CMP* /X,ind/ | | /prefix1/ | | | | /prefix1/ | *INY* | *CMP* /#/ | *DEX* | | *CPY* /abs/ | *CMP* /abs/ | *DEC* abs | | +| D- | *BNE* /rel/ | *CMP* /ind,Y/ | | /prefix1/ | | | | /prefix1/ | *CLD* | *CMP* /abs,Y/ | | | | *CMP* /abs,X/ | *DEC* abs,X | | +| E- | *CPX* /#/ | *SBC* /X,ind/ | | /prefix1/ | | | | /prefix1/ | *INX* | *SBC* /#/ | *NOP* | | *CPX* /abs/ | *SBC* /abs/ | *INC* abs | | +| F- | *BEQ* /rel/ | *SBC* /ind,Y/ | | /prefix1/ | | | | /prefix1/ | *SED* | *SBC* /abs,Y/ | | | | *SBC* /abs,X/ | *INC* abs,X | | ** Instruction encoding @@ -102,14 +106,16 @@ A size and a literal operand is given immediately after the instruction. | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |---+---+----+----+---+---+---+---| -| A | A | OS | OS | 0 | S | 1 | 1 | +| P | A | OS | OS | 0 | S | 1 | 1 | - OS :: Operand Size - 00 8bit - 01 16bit - 10 32bit - 11 64bit -- A :: Address Size +- A :: Address Mode + - 0 normal (8/16bit) + - 1 extended (16/32) - S :: sign-extension @@ -147,4 +153,4 @@ A size and a literal operand is given immediately after the instruction. - [[http://www.6502.org/users/andre/65k/index.html][The 65k Project (André Fachat)]] - [[https://web.archive.org/web/20221029042214if_/http://archive.6502.org/datasheets/mos_65e4_microprocessor_final_design_spec_may_10_1982.pdf][mos65e4]] -- [[http://www.mirkosoft.sk/65832.html]][WDC 65832] \ No newline at end of file +- [[http://www.mirkosoft.sk/65832.html][WDC 65832]] diff --git a/doc/tokipona.org b/doc/tokipona.org new file mode 100644 index 0000000..021e18c --- /dev/null +++ b/doc/tokipona.org @@ -0,0 +1,19 @@ + + +| | -0 | -1 | -2 | -3 | -4 | -5 | -6 | -7 | -8 | -9 | -A | -B | -C | -D | -E | -F | +| 0- | | | | | | | | | | | | | | | | | +| 1- | | | | | | | | | | | | | | | | | +| 2- | | ! | " | # | $ | % | & | ' | ( | ) | * | + | , | - | . | / | +| 3- | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 9 | : | ; | < | = | > | ? | +| 4- | @ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | +| 5- | P | Q | R | S | T | U | V | W | X | Y | Z | [ | ¥ | ] | ^ | _ | +| 6- | ` | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | +| 7- | p | q | r | s | t | u | v | w | x | y | z | { | \vert{} | } | ‾ | DEL | +| 8- | | ~a~ | ~akesi~ | ~ala~ | ~alasa~ | ~ale~ | ~anpa~ | ~ante~ | ~anu~ | ~awen~ | ~e~ | ~en~ | ~esun~ | ~ijo~ | ~ike~ | ~ilo~ | +| 9- | ~insa~ | ~jaki~ | ~jan~ | ~jelo~ | ~jo~ | ~kala~ | ~kalama~ | ~kama~ | ~kasi~ | ~ken~ | ~kepeken~ | ~kili~ | ~kiwen~ | ~ko~ | ~kon~ | ~kule~ | +| A- | ~kulupu~ | ~kute~ | ~la~ | ~lape~ | ~laso~ | ~lawa~ | ~len~ | ~lete~ | ~li~ | ~lili~ | ~linja~ | ~lipu~ | ~loje~ | ~lon~ | ~luka~ | ~lukin~ | +| B- | ~lupa~ | ~ma~ | ~mama~ | ~mani~ | ~meli~ | ~mi~ | ~mije~ | ~moku~ | ~moli~ | ~monsi~ | ~mu~ | ~mun~ | ~musi~ | ~mute~ | ~nanpa~ | ~nasa~ | +| C- | ~nasin~ | ~nena~ | ~ni~ | ~nimi~ | ~noka~ | ~o~ | ~olin~ | ~ona~ | ~open~ | ~pakala~ | ~pali~ | ~palisa~ | ~pan~ | ~pana~ | ~pi~ | ~pilin~ | +| D- | ~pimeja~ | ~pini~ | ~pipi~ | ~poka~ | ~poki~ | ~pona~ | ~pu~ | ~sama~ | ~seli~ | ~selo~ | ~seme~ | ~sewi~ | ~sijelo~ | ~sike~ | ~sin~ | ~sina~ | +| E- | ~sinpin~ | ~sitelen~ | ~sona~ | ~soweli~ | ~suli~ | ~suno~ | ~supa~ | ~suwi~ | ~tan~ | ~taso~ | ~tawa~ | ~telo~ | ~tenpo~ | ~toki~ | ~tomo~ | ~tu~ | +| F- | ~unpa~ | ~uta~ | ~utala~ | ~walo~ | ~wan~ | ~waso~ | ~wawa~ | ~weka~ | ~wile~ | ~tonsi~ | | | | | | | diff --git a/vm/res/fonts.bmp b/vm/res/fonts.bmp new file mode 100644 index 0000000000000000000000000000000000000000..a6e1dfaf7066d916d42d6324b0b7bead358eebff GIT binary patch literal 65674 zcmeI2y_#G{azwF`DN`??XIV#<9KDKM8M61Ksfh*-c^J&Bd%I`ICBUgq=*Wz}svgW5 z#HYXi*FV1e?Mu!--v0dW+n@jY_UCV3{^QHPzRh3W^nd@iFONTu_3`o3moH!cFWXOl z|Ih#apI@|l)4%-I_STrzFF)llPq^vLd(XU`yLTi%dEr|3?iqj3{9}3hfVZ|~%>M{8 z-x<97o$y~__u;?8$J@ubXxSU_z)!oiZKgYV4n02-^1Z-^sV9_o?@L;rK2=PTrnl?C{2sou z-aT_yu=xk^?ZdtwVdlH>z5U(MCVck0yLZb@o{8J?&2L%ro|E_P+1(p&&*%L0zbij~ z4u9^S!{ZlTAO8Ci{hJZrZ-h6(TIL)h`ZGvJXPWQ5{qNnoKYI?nU$7?P_-BQS|oV&YpXB-ghSFgMNZbJsSf$ESOp!+Y|y z-`>`G$Gh?9SNLo`e$G{Q>&cnx9qn%aDNh$@@70VB(s2jLfSob#Iley5w&opQIC_le z;FLwXgWPk+`+ItxeFxwB^d>x0H(X=)p*Nr1n&-*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