aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-03-22 16:32:38 -0700
committerChristian Cunningham <cc@localhost>2022-03-22 16:32:38 -0700
commit2612bc83c57d3bc36d6042db14d898324c0091ff (patch)
treeff32e3a76b13f7f66ba20461c8ce076108678e61 /src/tests
parent24f8a2e4e887f50667b82798daa13bd55fb886b4 (diff)
Schedule upon task addition
Disable local timer Added CPSR Test
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test.S21
-rw-r--r--src/tests/test.c1
2 files changed, 22 insertions, 0 deletions
diff --git a/src/tests/test.S b/src/tests/test.S
index 035f8f6..e80b6be 100644
--- a/src/tests/test.S
+++ b/src/tests/test.S
@@ -2,9 +2,30 @@
a.btest:
push {lr}
+ mov r0, #5
+ cmp r0, #4
pop {pc}
.globl atest
atest:
push {lr}
+ ldr r0, =a.btest
+ mov r1, #0
+ mov r2, #0
+ bl add_thread
+ mov r0, #5
+ subs r0, #5
+ svc #0
+ beq 1f
+ mov r0, #0
+ mov r1, #11
+ mov r2, #0x4E
+ mov r3, #0xFF0000
+ bl draw_cletter
+ pop {pc}
+1: mov r0, #0
+ mov r1, #11
+ mov r2, #0x59
+ mov r3, #0xFF00
+ bl draw_cletter
pop {pc}
diff --git a/src/tests/test.c b/src/tests/test.c
index 0d72e0a..be37048 100644
--- a/src/tests/test.c
+++ b/src/tests/test.c
@@ -505,6 +505,7 @@ void qualitative_tests(void)
draw_string(0, y+2, " ");
draw_string(0, y+3, " ");
x = 0;
+ add_thread(atest, 0, 0);
add_thread(priority_inversion_test1, 0, 3);
add_thread(deadlock_test1, 0, 5);
add_thread(semaphore_test1, 0, 6);