1 ;**********************************************************************
3 ; Include this at the top of each file.
4 ; Does the following things:
5 ; includes the PIC18F458 definitions file (register and bit names)
6 ; switches to decimal by default
7 ; defines various useful macros
9 include /usr/share/gputils/header/p18f458.inc
12 ;==============================
15 ; Access bank locations
19 TESTFLASH equ 04h ; test LED flash pattern
22 ;==============================
23 ; Program (flash) memory regions
25 ; Actual code starts at 0 with the reset and interrupt vectors and
26 ; then the program proper.
29 ; Area filled in by morse-auto.asm (see morse-auto.asm-gen for details)
30 morse_messages_start equ 0x4000
31 morse_messages_end equ 0x4400
33 ;----------------------------------------
34 ; ifbit1(REGISTER,BITNUMBER)
35 ; executes the next instruction but only if bit BITNUMBER
36 ; in REGISTER (which must be in the access bank) is set
37 ifbit1 macro REGISTER, BITNUMBER
38 btfsc REGISTER, BITNUMBER, 0
41 ;----------------------------------------
42 ; ifbit0(REGISTER,BITNUMBER)
43 ; executes the next instruction but only if bit BITNUMBER
44 ; in REGISTER (which must be in the access bank) is clear
45 ifbit0 macro REGISTER, BITNUMBER
46 btfss REGISTER, BITNUMBER, 0