From WikiTI
Jump to: navigation, search


Unofficial Name: SetAppRestrictions

BCALL Address: 52F6

Minimum OS Version: 2.40

Enable specified "TestGuard 2" app/program restrictions.


  • A = 0: disable app by name
    • OP1 = name of app to disable
  • A = 1: disable all apps
  • A = 2: disable programs
  • A = 3: disable programs and all apps
  • A = 4: set permission bitmap
    • OP3 (14 bytes) = new bitmap to be ANDed with current bitmap


  • Carry set if A = 0 and the requested app does not exist
  • Otherwise, carry reset, regardless of the effect or lack thereof


  • AF, BC, DE, HL
  • OP1-OP2, ramCode, probably other areas


Note that this routine is cannot remove restrictions, only create them.

The permission bitmap, used by the A = 4 option, is fourteen bytes and is arranged as follows:

  • Byte 0, bit 0 is reset to disable execution and editing of both BASIC and assembly programs in the OS.
  • The remaining bits of byte 0 appear to be unused, but might be used in the future for other global permission states.
  • Byte a, bit b (a > 0) is reset to disable execution of the application with base page 8a+b. (In other words, the pages are given in "memory order," rather than "installation order" as with the app presence bitmap.)
  • The last 8 bytes are unused on the 84+ BE (but the corresponding bytes of OP3 are still copied to the certificate.)

Remember that you can clear all restrictions by receiving any file over the link, or by manually sending a file.