Basic-ML merge info.

Discuss anything related to the VIC
Post Reply
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Basic-ML merge info.

Post by nbla000 »

Now i will single file "U-Boot" another unexpanded game that use 2 part, the first one for instructions and for load characters in memory from $1c00 to $1c9f and the 2nd for a small main program.

Now i'm single filed and crunched it but i want to preserve the instruction writed in basic in the first part.

After loading the crunched program the LIST is:

Code: Select all

239 SYS4109
Now i will to add some line, so the result is:

Code: Select all

1 PRINT"U-BOOT DO YOU LIKE INSTRUCTIONS ?"
2 GETA$:IFA$=""THEN2
3 IFA$="Y"THEN5
4 GOTO239
5 PRINT"INSTRUCIONS"
10 GETA$:IFA$=""THEN10
239 SYS4109
but on SYS4109 now the program crash because the basic overwrite the $1001> bytes in memory, there is a way to direct the basic from example from $1900? another way to fix this problem?
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Post by nippur72 »

I'm not sure if this works or not: try to organize the basic packed structure so to skip the machine language part (look at page 120 or the reference guide). You have to change the "link" to next line. Something like this:

Code: Select all

1000: <link to $1900> "239 GOTO3000" <end of line (0)>
100D: <ML part here starting>
1900: <your basic code here starting at line 3000> <end of line (0)> 
      <end of basic ($0000)>
Of course your basic code should have a SYS 4109 somewhere.
Post Reply