Upload support using BLL

Adding uploader functionality to your program using BLL
Word count: 195

BLL has uploader support as part of its debugging capabilities. You can include the uploader using BLL with the following actions in your implementation:

  • Set DEBUG to any value.
  • Include required macros, variables and implementation for debugging, IRQ and serial support.
  • Make a call to InitComLynx, which will include the uploader if DEBUG is set (as in first action).

Your BLL assembler code will look similar to this:

DEBUG set 1
Baudrate set 62500

; Other initialization

; Macros for debugging and IRQ
include <macros/debug.mac>
include <macros/irq.mac>

; Variables for debugging, IRQ and serial support
include <vardefs/debug.var>
include <vardefs/irq.var>
include <vardefs/serial.var>

; Your initialization code

INITIRQ irq_vectors
jsr InitComLynx     ; Located in serial.inc

; Rest of your logic

; Implementation of IRQ, debugging and serial support included last
include <includes/irq.inc>
include <includes/debug.inc>
include <includes/serial.inc>

The inclusion of serial.inc sets a value SERIAL to 1 as an indication that serial support is available. The debug.inc code will evaluate this value to add some additional features for debugging,

InitComLynx::
****************
    php
    sei
IFD DEBUG
    jsr InstallLoader
ENDIF