Skip to content

Latest commit

 

History

History
123 lines (105 loc) · 1.33 KB

hardcode.md

File metadata and controls

123 lines (105 loc) · 1.33 KB

2050/100/1/c

HC

GRAB 300
LINK 800

TEST F = #COMA
REPL A
TJMP 11
TEST F = #RANG
TJMP 3
TEST F = #STOP
TJMP 9
TEST F = #LBRA
TJMP 4
TEST F = #LBRA
TJMP 8
TEST F = #RBRA
TJMP 2
TEST F = #LANG
TJMP 1
SEEK 7
TEST F = #MINS
TJMP 6
TEST F = #RANG
TJMP 5
TEST F = #PLUS
TJMP 7

NOTE 10;     TRANS TO BF
COPY 2730 M

MARK 10A
COPY 2927 M
COPY 2727 M
COPY 2929 M
COPY   46 #OUTP
JUMP 10A

MARK 1;        DECREMENT
SUBI #INPT 1 #OUTP
JUMP 1

MARK 2;          REVERSE
COPY #INPT T
COPY T F
TJMP 2

MARK 2A
SEEK -2
COPY F #OUTP
JUMP 2A

MARK 3;             SORT
COPY 0003 M
COPY 1131 M
COPY 3850 M
COPY 5165 M
COPY 7076 M

MARK 4;       BIN TO DEC
COPY 2555 M
COPY  206 #OUTP

MARK 5;  "HELLO, WORLD!"
COPY 5685 M
COPY 9292 M
COPY 9516 M
COPY 7195 M
COPY 9892 M
COPY 8417 M
HOST      M
COPY   10 #OUTP

MARK 6;      "BRAINFUCK"
COPY 8298 M
COPY 8189 M
COPY 9486 M
COPY 8391 M
COPY  117 #OUTP
HOST      M

MARK 7;        OUTPUT 10
COPY 10 #OUTP
JUMP 7

MARK 8;        FIBONACCI
COPY X #OUTP
ADDI X T X
COPY T #OUTP
ADDI T X T
JUMP 8

MARK 9;      POWERS OF 2
COPY T #OUTP
MULI T 2 T
JUMP 9

MARK 11;    DEFAULT TEST
ADDI X 1 X
TEST F = #LANG
FJMP 11

SUBI X 1 M
COPY  -2 X
JUMP 11

MARK A;         HELPER A
FJMP B
SUBI M 3 X
MULI X M X
SUBI #INPT X #OUTP
JUMP A

MARK B;         HELPER B
COPY M X
SWIZ X 43 T
ADDI T 16 #OUTP
SWIZ X 21 T
ADDI T 16 #OUTP
JUMP B