83Plus:BCALLs:4E6A

From WikiTI
Jump to: navigation, search

Synopsis

Official Name: CreateAppVar

BCALL Address: 4E6A

Creates an appvar.

Inputs

  • HL = Length in bytes
  • OP1 = Name of appvar

Outputs

  • HL points to symbol table entry
  • DE points to data section
  • OP4 contains the name as inputted in OP1.

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. (OP1) doesn't have to be 15h. Contents of the appvar are random.

Example

ld hl,appvarName
RST rMov9ToOP1
ld hl,10
B_CALL CreateAppVar

appvarName: db AppVarObj,"VARNAME",0