Wiki

Clone wiki

Super-Mon / Short_internals

SHORT: INTERNALS

RELOCATING SHORT
================

THE SHORT RUNTIME NORMALLY LIVES AT
$1C00.1FFF. YOU CAN USE SUPER-MON TO
MOVE IT ANYWHERE YOU LIKE.

THE MAIN RULES:
- MAKE SURE THE SHORT RUNTIME IS
  *OUTSIDE* YOUR PROGRAM RANGE
- MAKE SURE THE DESTINATION LOCATION
  IS *INSIDE* YOUR PROGRAM RANGE.

LET'S SAY YOU HAVE A SHORT PROGRAM AT
$8000 USING THE DEFAULT RUNTIME, AND
YOU WANT TO MOVE THE RUNTIME TO $BC00:

#8000.BFFFP
#BC00<1C00.1FFFS

THAT'S IT!

INTERNALS
=========

ZERO-PAGE USAGE
===============

SHORT UTILIZES PART OF SUPER-MON'S SPACE
PLUS $63.6F. SO IT'S SAFE TO PUT YOUR
VARIABLES IN $00.1F AND $70.FF.


MAIN MEMORY USAGE
=================

SHORT LEAVES ALL OF MAIN MEMORY FREE FOR
YOUR PROGRAMS AND VARIABLES. HOWEVER,
DUE TO SHORT'S ENCODING, CERTAIN
PRACTICES MAKE SLIGHLY SMALLER PROGRAMS:

- USE ZERO-PAGE VARIABLES
- USE MAIN-MEMORY VARIABLES ABOVE $4000
- PUT YOUR PROGRAM ABOVE $4000

(MORE INTERNALS TO COME IN A FUTURE
 RELEASE...)

This page is from Super-mon's built-in help system.

Updated