Re: A82: Creating a VAR (the ROM_CALL)


[Prev][Next][Index][Thread]

Re: A82: Creating a VAR (the ROM_CALL)




>I think you have to set the type of the VAR too (load into OP1).

 You mean changing this:

>> CreateLvl:
>>  ld hl,game
>>  call $1A88
>>  ld     hl, 260
>>  jp   $22E0
>> 
>> game:
>>  .db "PJLVLSAM",0
>> 
>>

 to using this

  ld hl,game
  call $1A88
  ld     hl, 260
  jp   $22E0

game:
 .db 5,"PJLVLSAM",0

  ?????? That's how its done on the 83.     

> Besides
>that try cheking the amount of free mem before you call the function 
(It
>is normally =0 !). The reason is that ! or # is talking up all the 
space.
>Delete the one which takes up all the scaca (or resize it to 0 byte ?),
>before you try to create new vars.
>
>DInes

   I guess that's why it says ERROR: MEMORY, but I have absolutely no 
idea what you are talking about in the above statements with the ! and # 
symbols. Maybe you mean one of these:

---- CALL 2297 ---- Is memory availble 
--------------------------------------
Input: HL = Number of bytes to get
Result: DE = Number of bytes to get
        HL = Number of bytes you can have extra
        Carry clear on succes

---- CALL 22C8 ---- Is memory availble 2 
------------------------------------
Input: HL = Size of variable data
       OP1 = holds variable information on the var
       If the variable is a  program then A = length of name
Result: Carry clear if you can get it set otherwise.
Note: This function check that there is room for the data and the vat 
entry.


---- CALL 2848 ---- Is memory availble 
--------------------------------------
Input: HL = Number of bytes to get
Result: Same as 2297, but error handler called on error.

   But what do any of these do? And why is it important to check for 
availible memory even when there is 27K free on the calc?

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


Follow-Ups: