83Plus:BCALLs:4E6D

From WikiTI
Jump to: navigation, search

Synopsis

Official Name: CreateProtProg

BCALL Address: 4E6D

Creates a protected 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 06h. Contents of the program are random.

Example

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

progName: db ProtProgObj,"PROGNAME"