File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ int main(string[] args) {
7878
7979 string file;
8080 string outFile = " out" ;
81- ulong org = 0xFFFF ;
8281 bool orgSet;
8382 string [] includeDirs;
8483 bool optimise;
@@ -137,7 +136,7 @@ int main(string[] args) {
137136 }
138137
139138 try {
140- org = args[i].to! ulong (16 );
139+ backend. org = args[i].to! ulong (16 );
141140 }
142141 catch (ConvException) {
143142 stderr.writeln(" --org parameter must be hexadecimal" );
@@ -377,7 +376,6 @@ int main(string[] args) {
377376
378377 auto compiler = new Compiler();
379378 compiler.backend = backend;
380- compiler.backend.org = org;
381379 compiler.backend.orgSet = orgSet;
382380 compiler.backend.useDebug = doDebug;
383381 compiler.backend.exportSymbols = exportSymbols;
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ class BackendUXN : CompilerBackend {
3333 string assembler = " uxnasm" ;
3434
3535 this () {
36+ org = 0x100 ;
3637 output = new Output();
3738
3839 addrSize = 2 ;
@@ -163,7 +164,7 @@ class BackendUXN : CompilerBackend {
163164
164165 override void Init () {
165166 output ~= " |0 @vsp $2 @arraySrc $2 @arrayDest $2 @temp $2\n " ;
166- output ~= " |100 \n " ;
167+ output ~= format( " |%x \n " , org) ;
167168 output ~= " @on-reset\n " ;
168169 output ~= " #ffff .vsp STZ2\n " ;
169170 output ~= " init\n " ;
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class CodeRemover {
2525 " uxn_program_init" ,
2626 " uxn_program_end" ,
2727 " __uxn_program_init" ,
28- " __uxn_program_end " ,
28+ " __uxn_program_exit " ,
2929 " __x86_64_exception" ,
3030 " __rm86_exception" ,
3131 " __uxn_exception" ,
You can’t perform that action at this time.
0 commit comments