asmTron/tests/pow_test.txt

57 lines
877 B
Plaintext
Raw Normal View History

2020-05-29 00:41:13 +02:00
0000 NOP
0001 LDA memory > A
0010 ADD A + memspace
0011 SUB A - memspace
0100 STA A > memory
0101 OUT A > OUT
0110 JMP Jump to adress
0111 LDI par > A
1000 JIF Jump if (JC)
1001 HLO H-mem[memspace] > A
1010 HST A > H-mem[memspace]
1011 INP IN > A
1100 JMA Jump to A
1101 JRF Jump forward by par
1110 JRB Jump bachward by par
1111 HLT Halt
#####################
Start - Inputs #00011000
INP
STA 10001000 # Base
STA 10001011 # MultiplyRet
INP
STA 10001001 # Pow
Pow Counter #00011101
LDI 01111111
ADD 10001001
STA 10001010 # Pow counter
Call Multiply #00100001
LDA 10001000
STA 10000000 # Multiply Inp 1
LDA 10001011
STA 10000001 # Mutliply Inp 2
JMP 00000001
Loop # 00100111
STA 10001011
LDA 10001010
SUB NopAtEnd # Pow Counter
STA 10001010
JIF to Call Mutliply
Out
LDA 10001011
OUT
HLT 11111111
NOP 00000001