Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"C Nonsense in BASIC"
#2
Since you are working in MACHINE CODE, you must be careful when including binary files. What is happening there is the program execution is entering the charset.bas file and executing it as machine code. Such case is equivalent to this:

Code:
PRINT "HELLO WORLD"
ASM
  db 195, 0, 0 ; This is JP 0  !!!
END ASM
Compile and run it, and your program will reset the computer, because after the PRINT, it's executing JP 0 (ROM START).
To ensure the execution never reaches the included data files, just place an END. This will exit your program gracefully:
Code:
PRINT "HELLO WORLD"
END : REM Avoid entering the binary data

ASM
  db 195, 0, 0 ; This is JP 0  !!!
END ASM
This is useful, so you can include either ASM files, or even binary .bin files (object files) if they are relocatable, so you needn't compile them again (sort of binary libraries).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)