1
0
mirror of https://github.com/KarolS/millfork.git synced 2026-04-22 00:17:03 +00:00

CBM BASIC loader should use the actual address of main (fixes #111)

This commit is contained in:
Karol Stasiak
2021-11-12 02:45:53 +01:00
parent 38ad919ed9
commit a260d0a806
9 changed files with 45 additions and 96 deletions
+31
View File
@@ -0,0 +1,31 @@
#template $ADDR$
#if not(CBM)
#warn cbm/basic_loader module should be only used on Commodore targets
#endif
const array _basic_loader @ $ADDR$ = [
#if DISPLACED_MAIN
@word_le [
$ADDR$ + 0xB
],
#else
@word_le [
$ADDR$ + if(main.addr >= 10000, 1/0, 0xA) // use -D DISPLACED_MAIN=1 if you get an error here
],
#endif
10,
0,
$9e,
#if DISPLACED_MAIN
$30 + (main.addr/10000)%%10,
#endif
$30 + (main.addr/1000)%%10,
$30 + (main.addr/100)%%10,
$30 + (main.addr/10)%%10,
$30 + (main.addr/1)%%10,
0,
0,
0
]
+1 -19
View File
@@ -1,19 +1 @@
#if not(CBM)
#warn loader_0401 module should be only used on Commodore targets
#endif
const array _basic_loader @$401 = [
$0b,
4,
10,
0,
$9e,
$31,
$30,
$33,
$37,
0,
0,
0
]
import cbm/basic_loader<$401>
+1 -19
View File
@@ -1,19 +1 @@
#if not(CBM)
#warn loader_0801 module should be only used on Commodore targets
#endif
const array _basic_loader @$801 = [
$0b,
$08,
10,
0,
$9e,
$32,
$30,
$36,
$31,
0,
0,
0
]
import cbm/basic_loader<$801>
+2 -1
View File
@@ -22,4 +22,5 @@ asm void __init_16bit() @$80D {
clc
xce
sep #$30
}
jmp main
}
+1 -19
View File
@@ -1,19 +1 @@
#if not(CBM)
#warn loader_1001 module should be only used on Commodore targets
#endif
const array _basic_loader @$1001 = [
$0b,
$10,
10,
0,
$9e,
$34,
$31,
$30,
$39,
0,
0,
0
]
import cbm/basic_loader<$1001>
+1 -19
View File
@@ -1,19 +1 @@
#if not(CBM)
#warn loader_1201 module should be only used on Commodore targets
#endif
const array _basic_loader @$1201 = [
$0b,
$12,
10,
0,
$9e,
$34,
$36,
$32,
$31,
0,
0,
0
]
import cbm/basic_loader<$1201>
+1 -19
View File
@@ -1,19 +1 @@
#if not(CBM)
#warn loader_1c01 module should be only used on Commodore targets
#endif
const array _basic_loader @$1C01 = [
$0b,
$1C,
10,
0,
$9e,
$37,
$31,
$38,
$31,
0,
0,
0
]
import cbm/basic_loader<$1c01>