From WikiTI
Revision as of 10:23, 9 March 2007 by Brandonw (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Unofficial Name: ExecuteNewPrgm

BCALL Address: 4C3C

Creates a new program, fills it with data, and then executes it.


  • A: type of variable to create (05h for programs, 06h for protected programs)
  • HL: pointer to structure (described below)


  • None

Registers Destroyed

  • All


The structure which this routine takes as argument is shown below.

DB "NAME",0 ;zero-terminated name of program
DW wSize    ;size of program
;program data

It will execute both BASIC and assembly programs. If the variable already exists and is archived, an error is thrown. If it is type 06h (protected), ERR:RESERVED is thrown (for whatever reason). Otherwise, it is deleted.

In theory, any variable can be created from this routine and "executed", but don't.