83Plus:BCALLs:4E70: Difference between revisions
From WikiTI
Jump to navigationJump to search
No edit summary |
|||
| Line 21: | Line 21: | ||
== Comments == | == Comments == | ||
If the length of name is shorter than 8 characters it must be zero-terminated. If there isn't enough RAM a memory error will be generated. Contents of the program are random. | If the length of name is shorter than 8 characters it must be zero-terminated. If there isn't enough RAM a memory error will be generated. Contents of the program are random.<br /><br /> | ||
This Seems to leak memory when creating variables. ~ Geekboy1011 | |||
== Example == | == Example == | ||
Latest revision as of 06:42, 23 February 2013
Synopsis
Official Name: CreateVar
BCALL Address: 4E70
Creates a variable of a specified type.
Inputs
- A: type of variable to create (05h for programs, 06h for protected programs, etc.)
- HL: length in bytes
- OP1+1 = name of variable
Outputs
Registers Destroyed
Comments
If the length of name is shorter than 8 characters it must be zero-terminated. If there isn't enough RAM a memory error will be generated. Contents of the program are random.
This Seems to leak memory when creating variables. ~ Geekboy1011
Example
Create an unprotected program of size 10:
ld hl,progName-1 RST rMov9ToOP1 ld hl,10 ld a,05h B_CALL CreateVar progName: db "PROGNAME"