asm

Quick ref: Pass arguments to machine code from the Monitor

When calling a machine code subroutine from the Monitor, one or two additional arguments can be passed by taking advantage of the way the Monitor uses delimiters to parse arguments from its command-line and stores them in the zero-page pointers A1, A2, A3, A4...in an arbitrarily-strange order:
  • The default argument is always the subroutine address, stored in A1.
  • Appending a '.' delimiter allows another argument to be stored in A2.
  • Inserting a '<' delimiter allows an argument to be stored in A4.
Tags: 

Transmitting a simple datagram via Video Vapor

  • Define a short datagram to be transmitted via vapor from visible screen memory.
  • Encode single-cycle accurate video phase via vapor datagram.
  • Construct a routine to receive the vapor datagram and synchronize itself to the video scanner.
  • Write a simple BASIC program to demonstrate all that!

PRINTDCI quick-and-easy ASM printing routine

Synopsis

This short routine makes it easy to print strings from assembly code, or even from the mini-assembler.  (Especially in the Enhanced monitor, which lets you enter ASCII characters using a ` prefix.)

 

Detail

Assemblers like EDASM have a directive called DCI that encodes an ASCII string in such a way that the end of the string can be distinguished by checking its high bit.  The DCI statement converts your string into ASCII bytes so that most characters have the high bit cleared, but the last character has its high bit set.

Tags: 
Subscribe to asm