Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Log

Base64 decoder [TIS-3D]

Recommended Posts

img.thumb.png.5227b9d8ff9ec1fb9ef8c453be53c633.png

Lookup table generator

#DEFINE RAM UP

MOV 65 ACC        
LOOP: MOV ACC RAM
    SWP
    MOV ACC RAM
    ADD 1
    SWP
    SUB 90
    JEZ LOW
    SUB 32
    JEZ DIGITS
    ADD 65
    JEZ HALT
    ADD 58
    JMP LOOP
#BWTM

LOW: MOV 97 ACC
    JMP LOOP

DIGITS: MOV 48 ACC
    JMP LOOP

HALT: MOV 43 RAM
    MOV 62 RAM
    MOV 47 RAM
    MOV 63 RAM
    JRO 0

Decoder

#DEFINE TERM UP
#DEFINE ROM LEFT
#DEFINE BUFF RIGHT
#DEFINE OUT DOWN

LOOP: MOV TERM ACC #1
    JEZ CLEAR
    MOV ACC ROM
    MOV ROM ACC
    SUB 61
    JEZ CLEAR
    ADD 61
    SHL 2
    MOV ACC BUFF
    MOV TERM ROM
    MOV ROM ACC
    SAV
    SHR 4
    OR BUFF
    MOV ACC OUT
#BWTM

    SWP #2
    AND 15
    SHL 4
    MOV ACC BUFF
    MOV TERM ROM
    MOV ROM ACC
    SAV
    SHR 2
    OR BUFF
    MOV ACC OUT
    SWP #3
    AND 3
    SHL 6
    MOV TERM ROM
    OR ROM
    MOV ACC OUT
    JMP LOOP
CLEAR: SAV

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.