LoginLogin

_ASMLOAD

Root / Submissions / [.]

MinxrodCreated:
Download:QR Codes
Version:1.1Size:548B
This program is an attempt at creating a simple/shared way to load custom ARM code for use within Petit Computer programs. The intended use case is writing custom instructions that are inserted into the instruction table and used in programs as if they are normal instructions, but you could probably do some other interesting things with this as well. The program loader itself is _ASMLOAD. To use it, you set the variable LOADER$ to be the name of the calling program. The calling program must set up the GRP containing the ARM code, as well as check for the _ASM variable to prevent infinite loading. An example setup would be as follows:
IF _ASM THEN @INIT
ACLS:CLEAR
ASMGRP$="your_asm_grp_here"
LOADER$="this_program_name_here"
EXEC "_ASMLOAD"
IF !RESULT THEN ?"Error: _ASMLOAD is missing!":END
@INIT
More info, source code and an example ASM program + setup are located at https://github.com/Minxrod/PTC-ASM. Changes - v1.1: Better error checking

No posts yet (will you be the first?)