Login
Back to forumReply to this topicGo to last reply

Posted By

Torque222
on 2018-06-18
13:59:12
 Graphic 1 or 2

I would like to use
0 POKE 44,128:POKE128*256,0:NEW

Now if my program says GRAPHIC 1,1
It relocates basic again right where I was trying to keep it out of.

I could do:

0 Graphic 1,1
1 Poke 44,128:Poke128*256,0:New

and then load my program (without using Graphic 1 after that)

Any better ways? Or even any other ways?

Regards,
Robert

Posted By

SVS
on 2018-06-18
14:56:19
 Re: Graphic 1 or 2

The BASIC has its way to easy manage the graphic. The first time you use GRAPHIC x,y the system always allocates the graphic area from $2000 to $3FFF and shift the possible BASIC lines beyond this limit (RAM cell at $75 memorizes the status: $FF allocated, $00 no).
After this operation, all the further executions of GRAPHIC x,y do not move data area nor Basic lines (Ram cell at $75 memorizes the status: $FF allocated, $00 no)

To restore the BASIC lines back to $1000 you have to use GRAPHIC CLR (then not GRAPHIC 0!)

Posted By

Csabo
on 2018-06-18
17:19:33
 Re: Graphic 1 or 2

Just a very minor addition to what SVS said, only the topmost bit of the value on $75 is actually checked (so $80 and above = allocated, $7F and below = not allocated).

Adding POKE117,128 to your first example will work.

Posted By

SVS
on 2018-06-20
07:43:25
 Re: Graphic 1 or 2

@Csabo: are you sure of this? Browsing the code I've only found:
DEC $75
and LDA $75: BEQ xxxx

Thank you

Posted By

Csabo
on 2018-06-20
08:27:01
 Re: Graphic 1 or 2

Aha, you're right. $80 definitely works, that's what I always used, but to be super precise, it's 0 = unallocated, non-zero = allocated. Which means, from BASIC, it's probably best to do POKE117,1 to save 2 bytes happy



Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2024