Those values are normal in fact. The upper limit on strings is always the HIMEM.
So I don't know what to do really.
Maybe the only solution will be to convert everything to C but it will take me ages

Hialmar wrote:Thanks Chema.
The problem is that the OOM error only happens after 14 or 15 switches between the C and Basic code. So it's an interaction problem.
The Basic code of one of the 3 programs I still have in Basic takes most of the RAM so in order to switch to C I'll have to split this program in several parts and switch from one to another part.
Before doing this I'll try what Geoff Phillips says and try to backup page 1 and 2 as well as page 0.
Now where will I put all this...
Anyway, I'll get you posted.
Page 2 is system data. The 6502 stack is on page one.Godzil wrote:Backupup page 2 is, I think a bad idea as it is the 6502 stack, and when restoring, if the S register is not set back correctly it will fail abominably..l
Yep sorry you're right, I mixed things up (shame on meDbug wrote:Page 2 is system data. The 6502 stack is on page one.Godzil wrote:Backupup page 2 is, I think a bad idea as it is the 6502 stack, and when restoring, if the S register is not set back correctly it will fail abominably..l
Code: Select all
_SwitchToCommand
.(
ldy #$0 ; grab string pointer
lda (sp),y
sta tmp
iny
lda (sp),y
sta tmp+1
dey
sedoricloop2 ; copy the string to #35..#84
lda (tmp),y
sta $35,y
iny
ora #$0
bne sedoricloop2
lda #$0 ; terminate with a 0
sta $35,y
ldx #$fe ; re-init stack
txs
ldx #$34
ldy #$00
jsr $c4bd ; call the interpreter
rts ; will never be called
.)
Users browsing this forum: No registered users and 3 guests