Added an editor program. It doesn't edit anything yet :/

This commit is contained in:
2024-05-31 10:22:08 +02:00
parent 13bac619fc
commit 573299b799
4 changed files with 32 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
#include <stdio.h>
__attribute__ ((section("entry")))
int main(int argc, char** argv) {
if (argc < 2) {
printf("Usage: %s <file>\n", argv[0]);
return 1;
}
printf("%s\n", argv[1]);
return 0;
}
+16
View File
@@ -0,0 +1,16 @@
SECTIONS {
.text 0x400000 : {
*(entry);
*(.text*);
}
.data : {
*(.data*);
}
.rodata : {
*(.rodata*);
}
.bss : {
*(.bss*);
}
}
+1
View File
@@ -19,6 +19,7 @@ filetable:
db "testfont",0,0, "fnt",0,60,4
db "test",0,0,0,0,0,0, "txt",0,64,1
db "calc",0,0,0,0,0,0, "bin",0,65,6
db "editor",0,0,0,0, "bin",0,71,10
times 512-($-$$) db 0