t-edson / P65Pas

CPU 6502 Pascal Compiler/IDE/Debugger
GNU General Public License v3.0
119 stars 27 forks source link

Basic stub only 4 chars #47

Closed Skertan closed 1 year ago

Skertan commented 1 year ago
program NewProgram;
uses Commodore64;
var
  make_program_big : array[10000] of byte;  
  bt : byte;
begin
  bt := make_program_big[0];
  STROUT(@'HELLO WORLD!');
  while 1=1 do
  end;
end.

This program has a basic loader

10 SYS2070

but the asm-code for main starts at 12070. The program is startable with SYS12070. Either the main should be near the address $0801 (direct behind the Basic loader) or the loader should have 5 characters for the start address

Skertan commented 1 year ago

Got the solution: in commodore64.pas

//{$BOOTLOADER C64}
{$BOOTLOADER $0C, $08, $0A, $00, $9E, 'COD_5A', $00, $00, $00}