Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
a19370c
[ADD/WIP] Minimal SH4 backend for CASIO Prizm
seija-amanojaku Jun 24, 2025
a988653
Merge branch 'main' of https://github.com/tsoding/b into sh4
seija-amanojaku Jun 24, 2025
d3e72e4
[FIX] Remove pointless spacing
seija-amanojaku Jun 24, 2025
9becfde
[FIX] Also add the test but under a specific name
seija-amanojaku Jun 24, 2025
da7ed63
[WIP] Start making libb work out
seija-amanojaku Jun 24, 2025
8022b6f
[ADD] Start some work on the local libb, fix compiler bugs
seija-amanojaku Jun 25, 2025
143ca6a
[FIX/ADD] More compiler bugs, add basic printf
seija-amanojaku Jun 25, 2025
7f67dbf
[FIX/WIP] Start fixing issues btest reports
seija-amanojaku Jun 25, 2025
79192c9
[FIX] Fix array indexing on SuperH
seija-amanojaku Jun 26, 2025
ba0babd
Merge branch 'main' of https://github.com/tsoding/b into sh4
seija-amanojaku Jun 26, 2025
ab0c429
[FIX] Introduce "trampolines" to SH4 litterals
seija-amanojaku Jun 26, 2025
d79c0a4
[FIX] Did I ever mention I hate delay slots?
seija-amanojaku Jun 26, 2025
24f4555
[ADD] Make exit work, bitshifts
seija-amanojaku Jun 27, 2025
6a032bc
[ADD] Make a barebones SH4 runner
seija-amanojaku Jun 28, 2025
5f16109
[FIX] Handle negative printing
seija-amanojaku Jun 29, 2025
d29150f
[FIX] Fix binary operators in the tester
seija-amanojaku Jul 1, 2025
2c268a0
[ADD] Allow custom PREFIXes for non fxSDK setups
seija-amanojaku Jul 1, 2025
494206f
Merge branch 'main' into sh4
rexim Jul 3, 2025
0be9658
[ADD] Put some test cases
seija-amanojaku Jul 3, 2025
0cc9183
Merge branch 'main' of https://github.com/tsoding/b into sh4
seija-amanojaku Jul 4, 2025
e26ae66
[ADD] Allow a larger amount of autovars
seija-amanojaku Jul 4, 2025
8776d07
[ADD] Also make the stack pointer be able to move freely
seija-amanojaku Jul 4, 2025
058af58
[MOD/WIP] Start CIwerk
seija-amanojaku Jul 4, 2025
e5d83da
[FIX/CI] Fix a fun CI typo
seija-amanojaku Jul 4, 2025
3313b2a
[FIX] WE'RE GETTING WORKING PRIZM CI WITH THIS ONE
seija-amanojaku Jul 4, 2025
c9bf24c
[FIX] Fix slight typo in linker script
seija-amanojaku Jul 4, 2025
0e90050
[FIX] Allow jumps to any absolute symbol without warns
seija-amanojaku Jul 5, 2025
36291ff
Merge branch 'main' into sh4
rexim Jul 11, 2025
b935a0c
Add missing expected results for gas-x86_64-darwin
rexim Jul 11, 2025
f77ff65
Merge branch 'main' into sh4
rexim Jul 11, 2025
5ab205b
[ADD] Implement Index
seija-amanojaku Jul 11, 2025
459bb6b
[ADD/WIP] Look, ma, no fxgxa!
seija-amanojaku Jul 11, 2025
71b5615
[ADD/WIP] Start working on an assembler
seija-amanojaku Jul 12, 2025
61ac1e0
Merge branch 'main' of https://github.com/tsoding/b into sh4
seija-amanojaku Jul 27, 2025
db17764
Merge branch 'main' of https://github.com/tsoding/b into sh4
seija-amanojaku Jul 30, 2025
8d9dbbd
Merge branch 'main' of https://github.com/tsoding/b into sh4
seija-amanojaku Jul 30, 2025
045b7e8
Merge branch 'main' of https://github.com/tsoding/b into sh4
seija-amanojaku Aug 4, 2025
f7e9956
Failed CI award going straight to me !!!!!!
seija-amanojaku Aug 4, 2025
3af4a67
Do NOT make uxn CI use X11
seija-amanojaku Aug 4, 2025
bd1c207
Merge branch 'main' of https://github.com/tsoding/b into sh4
seija-amanojaku Aug 4, 2025
6444eb5
Merge branch 'main' of https://github.com/tsoding/b into sh4
seija-amanojaku Aug 5, 2025
8becdf0
Remove the dead runner submodule
rexim Aug 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions examples/fizzbuzz.b
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
main() {
extrn printf;
extrn exit;

auto i;

i = 0; while (i < (6 / 2)) {
printf("=");
i++;
}
printf("\n");

i = 1;

while (i <= 100) {
Expand All @@ -15,4 +23,5 @@ main() {
printf("\n");
i++;
}
return;
}
35 changes: 35 additions & 0 deletions examples/prizm-test.b
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// -*- mode: simpc -*-
y;
str[6];

main() {
extrn Bdisp_AllClr_VRAM;
extrn Bdisp_Fill_VRAM;
extrn Bdisp_PutDisp_DD;
extrn Bdisp_EnableColor;
extrn PrintPixXY;
extrn Bdisp_Rectangle;
auto color;
extrn exit;

color = 0;
y = 0;
str[0] = " Hello World from B!";

while (1) {
//Bdisp_AllClr_VRAM();
Bdisp_Fill_VRAM(7, 4);
Bdisp_Rectangle(16 + y, 16 + 2 * y, 64 + y, 64 + 2 * y, 7 - color);
PrintPixXY(1,y,str[0],color);
Bdisp_PutDisp_DD();
color = color + 1;
if (color > 7) {
color = 0;
}

y = y + 1;
if (y > 110) {
y = 0;
}
}
}
20 changes: 20 additions & 0 deletions examples/truth.b
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Written by LDA (seija-amanojaku)
// ---------------------------------
// Pretty much just a truth machine, as specified by https://esolangs.org/wiki/Truth-machine

main() {
extrn printf, getchar;
auto input;

while (1) {
printf("Input?\n");
input = getchar();
if (input == '0') {
printf("0\n");
return (0);
} else if (input == '1') {
while (1) printf("1\n");
}
}
return (1);
}
Binary file added libb/gas-sh4dsp-prizm-sel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added libb/gas-sh4dsp-prizm-uns.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading