summaryrefslogtreecommitdiff
path: root/cpu/prog_test1.rom
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2014-01-08 18:10:01 +0100
committerAlex AUVOLAT <alex.auvolat@ens.fr>2014-01-08 18:10:01 +0100
commitb2c5356b3f6d2e0a836a19b4cae1791d350785d3 (patch)
treec84011df6867b5fa9e4c211f300dbc0421683f93 /cpu/prog_test1.rom
parentfb4a33dfbbfd3d85e3ecee65bdee36b12c4f9937 (diff)
downloadSystDigit-Projet-b2c5356b3f6d2e0a836a19b4cae1791d350785d3.tar.gz
SystDigit-Projet-b2c5356b3f6d2e0a836a19b4cae1791d350785d3.zip
Assembler kind of works ; created simple assembly program that prints Tick! every second.
Diffstat (limited to 'cpu/prog_test1.rom')
-rw-r--r--cpu/prog_test1.rom36
1 files changed, 21 insertions, 15 deletions
diff --git a/cpu/prog_test1.rom b/cpu/prog_test1.rom
index 9695447..0d352b7 100644
--- a/cpu/prog_test1.rom
+++ b/cpu/prog_test1.rom
@@ -1,30 +1,36 @@
-48 8
-10101010 11111011 # liuz SP 85
+58 8
+11111111 11111011 # liuz SP 255
+00000000 00100000 # add D Z Z
# init:
00000010 01011011 # liuz B 64
00000010 01000001 # lw B 0(B)
-00010110 11000000 # add C C B
+00100000 10110011 # lilz E init
+00000000 10101011 # liu E init
+01000010 10101010 # jer E B Z
+00010001 00100000 # add D D B
01111111 11101100 # incri SP -2
-00000111 11010001 # sw C 0(SP)
-01010100 10010011 # lilz A msgtick
+00000111 00110001 # sw D 0(SP)
+00101100 10010011 # lilz A msgtick
00000000 10001011 # liu A msgtick
00010000 00010010 # jal ser_out_msg
-00000111 11000001 # lw C 0(SP)
+00000111 00100001 # lw D 0(SP)
01000000 11101100 # incri SP 2
-00110111 11100010 # j init
+01100111 11100010 # j init
# ser_out_msg:
-00000100 01001001 # lb B 0(A)
-00010100 10110011 # lilz E ser_out_msg_ret
-00000000 10101011 # liu E ser_out_msg_ret
-01000101 01001010 # jer B E Z
10000010 11011011 # liuz C 65
01000000 11000011 # lil C 2
+ # ser_out_msg_loop:
+00000100 01001001 # lb B 0(A)
+01001100 10110011 # lilz E ser_out_msg_ret
+00000000 10101011 # liu E ser_out_msg_ret
+01000010 10101010 # jer E B Z
00000110 01011001 # sb B 0(C)
-01001111 11100010 # j ser_out_msg
+10000000 10001100 # incri A 1
+00101111 11100010 # j ser_out_msg_loop
# ser_out_msg_ret:
00000000 01101010 # jr RA
# msgtick:
-10010110 00101010 # bytes 84 105
-11010110 11000110 # bytes 99 107
-00000000 10000100 # bytes 33 0
+00101010 10010110 # bytes 84 105
+11000110 11010110 # bytes 99 107
+10000100 00000000 # bytes 33 0