summaryrefslogtreecommitdiff
path: root/agbx/source/bs/done.c
diff options
context:
space:
mode:
Diffstat (limited to 'agbx/source/bs/done.c')
-rw-r--r--agbx/source/bs/done.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/agbx/source/bs/done.c b/agbx/source/bs/done.c
index be8f423..8e3726d 100644
--- a/agbx/source/bs/done.c
+++ b/agbx/source/bs/done.c
@@ -11,7 +11,7 @@
void agbx_done(agbx_err const _err) {
if (_err == agbx_err_ok) {
__asm__ (
- "swi 0x3\n"
+ "svc 0x3\n"
);
__builtin_unreachable();
}
@@ -19,8 +19,11 @@ void agbx_done(agbx_err const _err) {
agbx_set10(0x400'0000u,0x404u);
agbx_set10(0x500'0000u,0x0u);
agbx_set10(0x500'0002u,0x19u);
- agbx_i8 err[0x8u];
+ agbx_i8 err[0xBu];
for (agbx_i8 pos = 0x0u;pos != 0x8u;++pos) {err[pos] = (agbx_i8)_err >> pos & 0x1u;}
+ err[0x8u] = 0x0u;
+ err[0x9u] = 0x1u;
+ err[0xAu] = 0x0u;
for (agbx_i10 pos = 0x0u;pos != 0x9600u;pos += 0xF0u) {
agbx_setpx1(0x600'0000u,pos, err[0x0u]);
agbx_setpx1(0x600'0000u,pos + 0x1u,err[0x1u]);
@@ -30,12 +33,12 @@ void agbx_done(agbx_err const _err) {
agbx_setpx1(0x600'0000u,pos + 0x5u,err[0x5u]);
agbx_setpx1(0x600'0000u,pos + 0x6u,err[0x6u]);
agbx_setpx1(0x600'0000u,pos + 0x7u,err[0x7u]);
- agbx_setpx1(0x600'0000u,pos + 0x8u,0x0u);
- agbx_setpx1(0x600'0000u,pos + 0x9u,0x1u);
- agbx_setpx1(0x600'0000u,pos + 0xAu,0x0u);
+ agbx_setpx1(0x600'0000u,pos + 0x8u,err[0x8u]);
+ agbx_setpx1(0x600'0000u,pos + 0x9u,err[0x9u]);
+ agbx_setpx1(0x600'0000u,pos + 0xAu,err[0xAu]);
}
__asm__ (
- "swi 0x2\n"
+ "svc 0x2\n"
);
for (;;) {}
}