83Plus:BCALLs:4339

From WikiTI
Jump to: navigation, search

Synopsis

Official Name: CreateProg

BCALL Address: 4339

Creates a program.

Inputs

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

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 05h. Contents of the program are random.

Example

ld hl,progName
RST rMov9ToOP1
ld hl,10
B_CALL CreateProg

progName: db ProgObj,"PROGNAME"