File tree 3 files changed +4
-5
lines changed
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) {
78
78
79
79
string file;
80
80
string outFile = " out" ;
81
- ulong org = 0xFFFF ;
82
81
bool orgSet;
83
82
string [] includeDirs;
84
83
bool optimise;
@@ -137,7 +136,7 @@ int main(string[] args) {
137
136
}
138
137
139
138
try {
140
- org = args[i].to! ulong (16 );
139
+ backend. org = args[i].to! ulong (16 );
141
140
}
142
141
catch (ConvException) {
143
142
stderr.writeln(" --org parameter must be hexadecimal" );
@@ -377,7 +376,6 @@ int main(string[] args) {
377
376
378
377
auto compiler = new Compiler();
379
378
compiler.backend = backend;
380
- compiler.backend.org = org;
381
379
compiler.backend.orgSet = orgSet;
382
380
compiler.backend.useDebug = doDebug;
383
381
compiler.backend.exportSymbols = exportSymbols;
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ class BackendUXN : CompilerBackend {
33
33
string assembler = " uxnasm" ;
34
34
35
35
this () {
36
+ org = 0x100 ;
36
37
output = new Output();
37
38
38
39
addrSize = 2 ;
@@ -163,7 +164,7 @@ class BackendUXN : CompilerBackend {
163
164
164
165
override void Init () {
165
166
output ~= " |0 @vsp $2 @arraySrc $2 @arrayDest $2 @temp $2\n " ;
166
- output ~= " |100 \n " ;
167
+ output ~= format( " |%x \n " , org) ;
167
168
output ~= " @on-reset\n " ;
168
169
output ~= " #ffff .vsp STZ2\n " ;
169
170
output ~= " init\n " ;
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class CodeRemover {
25
25
" uxn_program_init" ,
26
26
" uxn_program_end" ,
27
27
" __uxn_program_init" ,
28
- " __uxn_program_end " ,
28
+ " __uxn_program_exit " ,
29
29
" __x86_64_exception" ,
30
30
" __rm86_exception" ,
31
31
" __uxn_exception" ,
You can’t perform that action at this time.
0 commit comments