; values in CAPS, self defined pointers and labels not, ; optimize for size rather than speed radix dec ; processor pic16f627 processor pic16f628a list n=0,st=off,mm=on ;#include "p16f627.inc" #include "p16f628a.inc" ; initialize some preprocessor symbols CONFIG_WORD = 0x3fff OPTION_REG_CONFIG = 0 ; set config word CONFIG_WORD &= _CP_OFF & _DATA_CP_OFF ; turn all code protection off CONFIG_WORD &= _LVP_OFF ; disable Low Voltage Programming CONFIG_WORD &= _BODEN_ON ; enable Brown-out Detect Reset CONFIG_WORD &= _MCLRE_ON ; enable reset pin CONFIG_WORD &= _PWRTE_ON ; enable power on timer CONFIG_WORD &= _WDT_OFF ; disable Watchdog Timer CONFIG_WORD &= _INTRC_OSC_NOCLKOUT ; enable internal oscillator __config CONFIG_WORD ; some useful definitions RA0 equ 0 ; RA0 is bit zero in PORTA ; file registers in bank 0,1,2,3 columns equ 0x70 ; amount of columns in eeprom buffer_hi equ 0x71 ; the actual buffer (high bits) buffer_lo equ 0x72 ; the actual buffer (low bits) count0 equ 0x73 ; useful counter for bit unpacking loop outer_delay equ 0x7e ; delay routine inner_delay equ 0x7f ; counters for primitive ; font bitmaps in EEPROM, variable width org 0x2100 start_text #include "bla.inc" end_text org 0x0000 reset_vector ; the chip starts executing our code here movlw 1<