Display 4 digits

This commit is contained in:
unlockable
2024-07-11 20:14:30 +08:00
parent da570f3bb4
commit f974f439d2
3 changed files with 61 additions and 0 deletions

23
16display_4_digits.asm Normal file
View File

@@ -0,0 +1,23 @@
lui $s0, 0x4000
addi $s0, $s0, 0x10
loop:
addi $s1, $zero, 0x179
sw $s1, 0($s0)
jal wait_for_some_time
addi $s1, $zero, 0x271
sw $s1, 0($s0)
jal wait_for_some_time
addi $s1, $zero, 0x477
sw $s1, 0($s0)
jal wait_for_some_time
addi $s1, $zero, 0x858
sw $s1, 0($s0)
jal wait_for_some_time
j loop
wait_for_some_time:
lui $t0, 0x0001
wait_loop:
addi $t0, $t0, -1
bgtz $t0, wait_loop
jr $ra

19
16display_4_digits.txt Normal file
View File

@@ -0,0 +1,19 @@
20'd0: instruction <= 32'h3c104000;
20'd1: instruction <= 32'h22100010;
20'd2: instruction <= 32'h20110179;
20'd3: instruction <= 32'hae110000;
20'd4: instruction <= 32'h0c00000f;
20'd5: instruction <= 32'h20110271;
20'd6: instruction <= 32'hae110000;
20'd7: instruction <= 32'h0c00000f;
20'd8: instruction <= 32'h20110477;
20'd9: instruction <= 32'hae110000;
20'd10: instruction <= 32'h0c00000f;
20'd11: instruction <= 32'h20110858;
20'd12: instruction <= 32'hae110000;
20'd13: instruction <= 32'h0c00000f;
20'd14: instruction <= 32'h08000002;
20'd15: instruction <= 32'h3c080001;
20'd16: instruction <= 32'h2108ffff;
20'd17: instruction <= 32'h1d00fffe;
20'd18: instruction <= 32'h03e00008;

View File

@@ -0,0 +1,19 @@
3c104000
22100010
20110179
ae110000
0c00000f
20110271
ae110000
0c00000f
20110477
ae110000
0c00000f
20110858
ae110000
0c00000f
08000002
3c080001
2108ffff
1d00fffe
03e00008