I'm trying to load a file which is &200 long at &400 from within my assembly language program using &FFF7 but it's crashing.
Is there a reason for this? I was hoping this would be a nice location to store a bit of game data.
Hopefully it is ok to do this and I've got my programming wrong somehow.
Loading files at &400
Re: Loading files at &400
That should be fine as long as BASIC is ‘off’ and not being used. Can you temporarily load the data somewhere else, say &0900-&0AFF or higher up in memory (but below screen mem) to see if it is a location problem?
- Diminished
- Posts: 598
- Joined: Fri Dec 08, 2017 9:47 pm
- Contact:
Re: Loading files at &400
Conversely, you could try scribbling 0x400-0x5ff with some other data (like zeroes) and see if it still crashes.
Re: Loading files at &400
I've spotted my error, I'd put in the following lines in my code:
.start4
EQUS"*L. MOB"
.start4a
EQUB1
but forgot to set the value of the byte at .start4a to 13 (carriage return) so got a bad string error.
Doh!
.start4
EQUS"*L. MOB"
.start4a
EQUB1
but forgot to set the value of the byte at .start4a to 13 (carriage return) so got a bad string error.
Doh!
Re: Loading files at &400
Can you do this?:
Code: Select all
.start4
EQUS"*L. MOB"+CHR$13

Re: Loading files at &400
Hi Lurkio, you had me hopeful for a while but I'm afraid your suggestion results in the error "Bad expression."
Re: Loading files at &400
Hmm. This works in the inline BASIC assembler:
Code: Select all
10 FORO=0TO3STEP3
20 P%=&3000
30 [OPT O
40 LDX#0
50 .loop
60 LDA msg,X
70 JSR &FFE3
80 INX
90 CMP#13
100 BNE loop
110 RTS
120 .msg EQUS "HELLO"+CHR$13
130 ]
140 NEXTO
150 CALL&3000
