diff --git a/count-license.txt b/count-license.txt new file mode 100644 index 0000000..3cf713e --- /dev/null +++ b/count-license.txt @@ -0,0 +1,59 @@ +count - Copyright (c) 2002, TundraWare Inc., All Rights Reserved + +This license refers to the following files found in the 'count.zip' +archive. + +count.asm +COUNT.COD +COUNT.ERR +COUNT.HEX +COUNT.LST +COUNT.XRF +Makefile + +Hereafter, these files are referred to collectively as the "Count Files". + +********** +* PLEASE NOTE: The files found in the TAIT-Test subdirectory of this +* archive are from David Tait. THEY ARE NOT PART OF THE COUNT FILES +* AND ARE NOT A SUBJECT OF THIS LICENSE AGREEMENT. The files in the +* TAIT-Test subdirectory remain the property of Mr. Tait who has +* given permission for their distribution. +********** + +Permission to use and distribute the Count Files is hereby granted so +long as ALL the following conditions are met: + + 1) The user of the Count Files understands and agrees that this is + experimental software which is provided "AS-IS" with no + warranties expressed or implied by TundraWare Inc. + + 2) The user acknowledges the Count Files has NOT been tested for: + a) Correct operation + b) Freedom from unintended consequences + c) Any operation or condition which might cause damage to + the user's machine, software, network, or data, or which + might cause any breach of system security of the user's + system(s) or any other systems. + + 3) By using the Count Files, the user does so at their own risk and + agrees to hold TundraWare Inc. harmless for any damage, + direct or indirect, that this software may or does cause to + the user's computational environment, including, but not + limited to, the user's hardware, software, network, or data. + The user further agrees to hold TundraWare Inc. harmless for + any economic damage or any other adverse consequence, direct + or indirect, caused by the use of the Count Files. + + 4) If duplicated and/or distributed, no fee beyond reasonable + duplication charges may be charged for the Count Files. + + 5) Any distributed copies of the Count Files must include all the + originally provided software, documentation, and licensing + information. + +If you do not understand, or cannot abide by any of these conditions, +DO NOT USE the Count Files. + +To report bugs or suggest improvements, contact: tundra@tundraware.com + diff --git a/count.asm b/count.asm new file mode 100644 index 0000000..090c5bd --- /dev/null +++ b/count.asm @@ -0,0 +1,127 @@ +; COUNT.ASM +; Copyright (c) 2002, TundraWare Inc. +; +; Loosely based on David Tait's LED 'WALK.ASM' Test Program +; Uses same hardware setup but counts in binary, flashing at +; full count. + +;;; Generally speaking, UPPER-CASE symbols in the code below are +;;; defined in the standard MPLAB include file. My code is in +;;; lower-case. + + + list p=16F84A + #include + + errorlevel -302 ;suppress bank selection messages + __config 3ff5h ;xt osc, watchdog + __idlocs 1234 + +;;; Device Constants + + +pre1 equ 08h ; prescaler constants +pre2 equ 09h +pre4 equ 0ah +pre8 equ 0bh +pre16 equ 0ch +pre32 equ 0dh +pre64 equ 0eh +pre128 equ 0fh + + +;;; Program Constants + +blinkcnt equ 05h ; number of times to blink +bcount equ 0dh ; register to hold blink count +maxcnt equ 0fh ; maximum count to display +preblink equ pre32 ; prescaler value for blinking +precount equ pre16 ; prescaler value for counting + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;; +; Main program logic +;;; + +begin call portb_w ; setup PORTB for writing + movlw precount ; set prescaler for slow disply + call wdt_pre + movlw maxcnt ; number of counts + clrf PORTB ; all leds off +count sleep ; display current count for a while + incf PORTB,F ; next value to display + movf PORTB,W ; see if we're displaying 'maxcnt' + andlw 0fh ; mask hi nibble - no LEDs there + xorlw maxcnt ; subtract 'maxcnt' from w + btfss STATUS,Z + goto count ; nope, continue counting + call blink + goto begin + +;;; End of main logic + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;; +; Supporting Subroutines +;;; + +;;; +; Set PORTB To Write +; Returns with Bank 0 selected +;;; + +portb_w bsf STATUS,RP0 ; select register bank 1 + clrf TRISB ; set PORTB to all outputs + bcf STATUS,RP0 ; select register bank 0 + return + +;;; End of 'portb_w' + + +;;; +; Set the WDT Prescaler +; Value required must be passed in w +; Returns with Bank 0 selected +;;; + +wdt_pre bsf STATUS,RP0 ; select register bank 1 + movwf OPTION_REG + bcf STATUS,RP0 ; bank0 so PORTB is addressable + return + +;;; End of 'wdt_pre' + + +;;; +; Blink The Lights +;;; + +blink movlw preblink ; set prescaler for fast blink + call wdt_pre + movlw blinkcnt ; number of times to blink + movwf bcount +bcycle sleep ; display on from caller + clrf PORTB ; display off + sleep + decfsz bcount,F ; if zero, we've done 'blinkcnt' repetitions + goto again ; we're not done yet + return ; all done +again movlw maxcnt ; blink again - display on + movwf PORTB + goto bcycle + +;;; End of 'blink' + + + +;;; +; EEPROM Contents +;;; + + org 2100h +; + DE "$Id: count.asm,v 1.9 2002/03/10 15:43:56 tundra Exp tundra $" + END + diff --git a/count.cod b/count.cod new file mode 100644 index 0000000..46efc19 --- /dev/null +++ b/count.cod Binary files differ diff --git a/count.err b/count.err new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/count.err diff --git a/count.hex b/count.hex new file mode 100644 index 0000000..6be3fa0 --- /dev/null +++ b/count.hex @@ -0,0 +1,17 @@ +:020000040000FA +:100000000E200C3012200F3086016300860A06088D +:100010000F390F3A031D0528162000288316860184 +:100020008312080083168100831208000D3012200D +:1000300005308D006300860163008D0B20280800C9 +:060040000F3086001A28B3 +:084000000100020003000400AE +:02400E00F53F7C +:104200002400490064003A00200063006F0075003C +:104210006E0074002E00610073006D002C007600AB +:10422000200031002E003900200032003000300024 +:1042300032002F00300033002F003100300020000A +:10424000310035003A00340033003A0035003600C2 +:104250002000740075006E00640072006100200090 +:104260004500780070002000740075006E00640046 +:0842700072006100200024002F +:00000001FF diff --git a/count.lst b/count.lst new file mode 100644 index 0000000..9ccd17b --- /dev/null +++ b/count.lst @@ -0,0 +1,273 @@ +MPASM 03.00 Released COUNT.ASM 3-10-2002 16:22:35 PAGE 1 + + +LOC OBJECT CODE LINE SOURCE TEXT + VALUE + + 00001 ; COUNT.ASM + 00002 ; Copyright (c) 2002, TundraWare Inc. + 00003 ; + 00004 ; Loosely based on David Tait's LED 'WALK.ASM' Test Program + 00005 ; Uses same hardware setup but counts in binary, flashing at + 00006 ; full count. + 00007 + 00008 ;;; Generally speaking, UPPER-CASE symbols in the code below are + 00009 ;;; defined in the standard MPLAB include file. My code is in + 00010 ;;; lower-case. + 00011 + 00012 + 00013 list p=16F84A + 00014 #include + 00001 LIST + 00002 ; P16F84A.INC Standard Header File, Version 2.00 Microchip Technology, Inc. + 00134 LIST + 00015 + 00016 errorlevel -302 ;suppress bank selection messages +2007 3FF5 00017 __config 3ff5h ;xt osc, watchdog +2000 0001 0002 0003 00018 __idlocs 1234 + 0004 + 00019 + 00020 ;;; Device Constants + 00021 + 00022 + 00000008 00023 pre1 equ 08h ; prescaler constants + 00000009 00024 pre2 equ 09h + 0000000A 00025 pre4 equ 0ah + 0000000B 00026 pre8 equ 0bh + 0000000C 00027 pre16 equ 0ch + 0000000D 00028 pre32 equ 0dh + 0000000E 00029 pre64 equ 0eh + 0000000F 00030 pre128 equ 0fh + 00031 + 00032 + 00033 ;;; Program Constants + 00034 + 00000005 00035 blinkcnt equ 05h ; number of times to blink + 0000000D 00036 bcount equ 0dh ; register to hold blink count + 0000000F 00037 maxcnt equ 0fh ; maximum count to display + 0000000D 00038 preblink equ pre32 ; prescaler value for blinking + 0000000C 00039 precount equ pre16 ; prescaler value for counting + 00040 + 00041 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + 00042 + 00043 ;;; + 00044 ; Main program logic + 00045 ;;; + 00046 +0000 200E 00047 begin call portb_w ; setup PORTB for writing +0001 300C 00048 movlw precount ; set prescaler for slow disply +0002 2012 00049 call wdt_pre + MPASM 03.00 Released COUNT.ASM 3-10-2002 16:22:35 PAGE 2 + + +LOC OBJECT CODE LINE SOURCE TEXT + VALUE + +0003 300F 00050 movlw maxcnt ; number of counts +0004 0186 00051 clrf PORTB ; all leds off +0005 0063 00052 count sleep ; display current count for a while +0006 0A86 00053 incf PORTB,F ; next value to display +0007 0806 00054 movf PORTB,W ; see if we're displaying 'maxcnt' +0008 390F 00055 andlw 0fh ; mask hi nibble - no LEDs there +0009 3A0F 00056 xorlw maxcnt ; subtract 'maxcnt' from w +000A 1D03 00057 btfss STATUS,Z +000B 2805 00058 goto count ; nope, continue counting +000C 2016 00059 call blink +000D 2800 00060 goto begin + 00061 + 00062 ;;; End of main logic + 00063 + 00064 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + 00065 + 00066 ;;; + 00067 ; Supporting Subroutines + 00068 ;;; + 00069 + 00070 ;;; + 00071 ; Set PORTB To Write + 00072 ; Returns with Bank 0 selected + 00073 ;;; + 00074 +000E 1683 00075 portb_w bsf STATUS,RP0 ; select register bank 1 +000F 0186 00076 clrf TRISB ; set PORTB to all outputs +0010 1283 00077 bcf STATUS,RP0 ; select register bank 0 +0011 0008 00078 return + 00079 + 00080 ;;; End of 'portb_w' + 00081 + 00082 + 00083 ;;; + 00084 ; Set the WDT Prescaler + 00085 ; Value required must be passed in w + 00086 ; Returns with Bank 0 selected + 00087 ;;; + 00088 +0012 1683 00089 wdt_pre bsf STATUS,RP0 ; select register bank 1 +0013 0081 00090 movwf OPTION_REG +0014 1283 00091 bcf STATUS,RP0 ; bank0 so PORTB is addressable +0015 0008 00092 return + 00093 + 00094 ;;; End of 'wdt_pre' + 00095 + 00096 + 00097 ;;; + 00098 ; Blink The Lights + 00099 ;;; + 00100 +0016 300D 00101 blink movlw preblink ; set prescaler for fast blink +0017 2012 00102 call wdt_pre + MPASM 03.00 Released COUNT.ASM 3-10-2002 16:22:35 PAGE 3 + + +LOC OBJECT CODE LINE SOURCE TEXT + VALUE + +0018 3005 00103 movlw blinkcnt ; number of times to blink +0019 008D 00104 movwf bcount +001A 0063 00105 bcycle sleep ; display on from caller +001B 0186 00106 clrf PORTB ; display off +001C 0063 00107 sleep +001D 0B8D 00108 decfsz bcount,F ; if zero, we've done 'blinkcnt' repetitions +001E 2820 00109 goto again ; we're not done yet +001F 0008 00110 return ; all done +0020 300F 00111 again movlw maxcnt ; blink again - display on +0021 0086 00112 movwf PORTB +0022 281A 00113 goto bcycle + 00114 + 00115 ;;; End of 'blink' + 00116 + 00117 + 00118 + 00119 ;;; + 00120 ; EEPROM Contents + 00121 ;;; + 00122 +2100 00123 org 2100h + 00124 ; +2100 0024 0049 0064 00125 DE "$Id: count.asm,v 1.9 2002/03/10 15:43:56 tundra Exp tundra $" + 003A 0020 0063 + 006F 0075 006E + 0074 002E 0061 + 0073 006D 002C + 0076 0020 0031 + 002E 0039 0020 + 0032 0030 0030 + 0032 002F 0030 + 0033 002F 0031 + 0030 0020 0031 + 0035 003A 0034 + 0033 003A 0035 + 0036 0020 0074 + 0075 006E 0064 + 0072 0061 0020 + 0045 007 + 00126 END + MPASM 03.00 Released COUNT.ASM 3-10-2002 16:22:35 PAGE 4 + + +SYMBOL TABLE + LABEL VALUE + +C 00000000 +DC 00000001 +EEADR 00000009 +EECON1 00000088 +EECON2 00000089 +EEDATA 00000008 +EEIE 00000006 +EEIF 00000004 +F 00000001 +FSR 00000004 +GIE 00000007 +INDF 00000000 +INTCON 0000000B +INTE 00000004 +INTEDG 00000006 +INTF 00000001 +IRP 00000007 +NOT_PD 00000003 +NOT_RBPU 00000007 +NOT_TO 00000004 +OPTION_REG 00000081 +PCL 00000002 +PCLATH 0000000A +PORTA 00000005 +PORTB 00000006 +PS0 00000000 +PS1 00000001 +PS2 00000002 +PSA 00000003 +RBIE 00000003 +RBIF 00000000 +RD 00000000 +RP0 00000005 +RP1 00000006 +STATUS 00000003 +T0CS 00000005 +T0IE 00000005 +T0IF 00000002 +T0SE 00000004 +TMR0 00000001 +TRISA 00000085 +TRISB 00000086 +W 00000000 +WR 00000001 +WREN 00000002 +WRERR 00000003 +Z 00000002 +_CP_OFF 00003FFF +_CP_ON 0000000F +_HS_OSC 00003FFE +_LP_OSC 00003FFC +_PWRTE_OFF 00003FFF +_PWRTE_ON 00003FF7 + MPASM 03.00 Released COUNT.ASM 3-10-2002 16:22:35 PAGE 5 + + +SYMBOL TABLE + LABEL VALUE + +_RC_OSC 00003FFF +_WDT_OFF 00003FFB +_WDT_ON 00003FFF +_XT_OSC 00003FFD +__16F84A 00000001 +again 00000020 +bcount 0000000D +bcycle 0000001A +begin 00000000 +blink 00000016 +blinkcnt 00000005 +count 00000005 +maxcnt 0000000F +portb_w 0000000E +pre1 00000008 +pre128 0000000F +pre16 0000000C +pre2 00000009 +pre32 0000000D +pre4 0000000A +pre64 0000000E +pre8 0000000B +preblink 0000000D +precount 0000000C +wdt_pre 00000012 + + +MEMORY USAGE MAP ('X' = Used, '-' = Unused) + +0000 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXX------------- ---------------- +2000 : XXXX---X-------- ---------------- ---------------- ---------------- +2100 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXX---- + +All other memory blocks unused. + +Program Memory Words Used: 35 +Program Memory Words Free: 989 + + +Errors : 0 +Warnings : 0 reported, 0 suppressed +Messages : 0 reported, 2 suppressed + + \ No newline at end of file diff --git a/count.xrf b/count.xrf new file mode 100644 index 0000000..df4a850 --- /dev/null +++ b/count.xrf @@ -0,0 +1,111 @@ +MPASM 03.00 Released COUNT.ASM 3-10-2002 16:22:35 PAGE 1 + + MPASM Cross Reference File + +LABEL TYPE FILE NAME SOURCE FILE REFERENCES +----- ---- --------- ---------------------- + +C C P16F84A.INC 76* +DC C P16F84A.INC 75* +EEADR C P16F84A.INC 57* +EECON1 C P16F84A.INC 64* +EECON2 C P16F84A.INC 65* +EEDATA C P16F84A.INC 56* +EEIE C P16F84A.INC 81* +EEIF C P16F84A.INC 102* +F C P16F84A.INC 45* +FSR C P16F84A.INC 53* +GIE C P16F84A.INC 80* +INDF C P16F84A.INC 49* +INTCON C P16F84A.INC 59* +INTE C P16F84A.INC 83* +INTEDG C P16F84A.INC 92* +INTF C P16F84A.INC 86* +IRP C P16F84A.INC 69* +NOT_PD C P16F84A.INC 73* +NOT_RBPU C P16F84A.INC 91* +NOT_TO C P16F84A.INC 72* +OPTION_REG C COUNT.ASM 90. + P16F84A.INC 61* +PCL C P16F84A.INC 51* +PCLATH C P16F84A.INC 58* +PORTA C P16F84A.INC 54* +PORTB C COUNT.ASM 51. 53. 54. 106. 112. + P16F84A.INC 55* +PS0 C P16F84A.INC 98* +PS1 C P16F84A.INC 97* +PS2 C P16F84A.INC 96* +PSA C P16F84A.INC 95* +RBIE C P16F84A.INC 84* +RBIF C P16F84A.INC 87* +RD C P16F84A.INC 106* +RP0 C COUNT.ASM 75. 77. 89. 91. + P16F84A.INC 71* +RP1 C P16F84A.INC 70* +STATUS C COUNT.ASM 57. 75. 77. 89. 91. + P16F84A.INC 52* +T0CS C P16F84A.INC 93* +T0IE C P16F84A.INC 82* +T0IF C P16F84A.INC 85* +T0SE C P16F84A.INC 94* +TMR0 C P16F84A.INC 50* +TRISA C P16F84A.INC 62* +TRISB C COUNT.ASM 76. + P16F84A.INC 63* +W C P16F84A.INC 44* +WR C P16F84A.INC 105* +WREN C P16F84A.INC 104* +WRERR C P16F84A.INC 103* +Z C COUNT.ASM 57. + MPASM 03.00 Released COUNT.ASM 3-10-2002 16:22:35 PAGE 2 + + MPASM Cross Reference File + +LABEL TYPE FILE NAME SOURCE FILE REFERENCES +----- ---- --------- ---------------------- + + P16F84A.INC 74* +_CP_OFF C P16F84A.INC 124* +_CP_ON C P16F84A.INC 123* +_HS_OSC C P16F84A.INC 131* +_LP_OSC C P16F84A.INC 129* +_PWRTE_OFF C P16F84A.INC 126* +_PWRTE_ON C P16F84A.INC 125* +_RC_OSC C P16F84A.INC 132* +_WDT_OFF C P16F84A.INC 128* +_WDT_ON C P16F84A.INC 127* +_XT_OSC C P16F84A.INC 130* +__16F84A V COUNT.ASM 13* + P16F84A.INC 34. +again A COUNT.ASM 109. 111* +bcount C COUNT.ASM 36* 104. 108. +bcycle A COUNT.ASM 105* 113. +begin A COUNT.ASM 47* 60. +blink A COUNT.ASM 59. 101* +blinkcnt C COUNT.ASM 35* 103. +count A COUNT.ASM 52* 58. +maxcnt C COUNT.ASM 37* 50. 56. 111. +portb_w A COUNT.ASM 47. 75* +pre1 C COUNT.ASM 23* +pre128 C COUNT.ASM 30* +pre16 C COUNT.ASM 27* 39. +pre2 C COUNT.ASM 24* +pre32 C COUNT.ASM 28* 38. +pre4 C COUNT.ASM 25* +pre64 C COUNT.ASM 29* +pre8 C COUNT.ASM 26* +preblink C COUNT.ASM 38* 101. +precount C COUNT.ASM 39* 48. +wdt_pre A COUNT.ASM 49. 89* 102. + + +LABEL TYPES +----------- +A Address +C Constant +E External +M Macro +S Segment +U Unknown +V Variable +X Other diff --git a/makefile b/makefile new file mode 100644 index 0000000..f150c1d --- /dev/null +++ b/makefile @@ -0,0 +1,8 @@ +# Makefile for PIC count.asm demo +# $Id: Makefile,v 1.2 2002/03/08 16:32:39 tundra Exp tundra $ + +all: + @c:/progra~1/mplab/mpasm /x /q count.asm +clean: + @rm -f *.cod *.err *.hex *.lst *.obj *.xrf + diff --git a/readme.txt b/readme.txt new file mode 100644 index 0000000..b739cfd --- /dev/null +++ b/readme.txt @@ -0,0 +1,31 @@ +'count.zip' contains some simple test code to help learn how +to program and burn a PIC 16F84(A) microcontroller. + +David Tait, the 'father' of the cheap PIC programmer, previously +distributed an example schematic and simple test program for shaking +out the coding/assembly/burn cycle for these devices. (These can be +found in the 'TAIT-test' subdirectory of this zip archive.) His +program, 'walk.asm', repeatedly cycles through a set of 4 LEDs. + +I've written a slightly more complicated test program for this same +hardware, 'count.asm', which counts in binary from 0 to an upper bound +you select (in the 'maxctn' constant) up to 0fh and then blinks +several ('blinkcnt') times. I wanted to illustrate a couple of ideas +that PIC newcomers might find useful to see: + +- Use of the MPLAB standard device include file. +- Symbolic definition of program parameters ('blinkcnt' and 'maxcnt'). +- Dynamic reprogramming of the prescaler. +- Use of subroutines to localize repeatedly used code. +- Use of logical operators for masking and subtraction. +- Implicit and explicit testing of Zero flag. +- Embedding RCS version information in EEPROM. + +One important note: My code is setup for a crystal oscillator rather +than an RC network as found in the original circuit. I found that the +capacitance of the prototyping board I was using dominated the very +small capacitance needed for the RC oscillator - the circuit ran with +*no* capacitor. This gave me some concerns as regards to oscillator +stability, so I switched to a crystal. If you are using an RC +oscillator as David Tait's original circuit suggests, simply change +__CONFIG to 3ff7H and reassemble 'count.asm'. diff --git a/tait-test/test.pcx b/tait-test/test.pcx new file mode 100644 index 0000000..eb30113 --- /dev/null +++ b/tait-test/test.pcx Binary files differ diff --git a/tait-test/walk.asm b/tait-test/walk.asm new file mode 100644 index 0000000..3398a10 --- /dev/null +++ b/tait-test/walk.asm @@ -0,0 +1,48 @@ +; WALK.ASM +; +; To use this program connect four LEDs from each of RB0-RB3 to ground +; via four 470 ohm resistors. The LEDs are illuminated one at time in +; a to-and-fro pattern. +; +; The illumination rate is more or less independent of the PIC clock +; frequency and configuration although this program assumes an RC +; oscillator. The program includes the __CONFIG, __IDLOCS and DE +; directives (mostly just to show how they can be used). The program +; can be used unchanged on any 16X8X device. + + LIST P=16C84 + ERRORLEVEL -302 ;SUPPRESS BANK SELECTION MESSAGES + __CONFIG 3FF7H ;RC OSC, WATCHDOG + __IDLOCS 1234 +; +PORTB EQU 6 +TRISB EQU 86H +OPTREG EQU 81H +STATUS EQU 3 +CARRY EQU 0 +RP0 EQU 5 +MSB EQU 3 ;BIT POSITION OF LEFTMOST LED +; + CLRF PORTB ;ALL LEDS OFF + BSF STATUS,RP0 ;SELECT REGISTER BANK 1 + CLRF TRISB ;SET PORTB TO ALL OUTPUTS + MOVLW 0AH + MOVWF OPTREG ;ASSIGN PRESCALER (1:4) TO WDT + BCF STATUS,RP0 ;SELECT REGISTER BANK 0 + INCF PORTB,F ;TURN ON RIGHTMOST LED + BCF STATUS,CARRY ;CLEAR CARRY +LEFT SLEEP ;WAIT FOR WDT TIMEOUT + RLF PORTB,F ;TURN ON LED TO LEFT + BTFSS PORTB,MSB ;REACHED LEFTMOST? + GOTO LEFT ;LOOP IF NOT +RIGHT SLEEP ;WAIT FOR WDT TIMEOUT + RRF PORTB,F ;TURN ON LED TO RIGHT + BTFSS PORTB,0 ;REACHED RIGHTMOST? + GOTO RIGHT ;LOOP IF NOT + GOTO LEFT ;START NEW CYCLE +; + ORG 2100H +; + DE "Copyright (C) 1996 David Tait" + END + diff --git a/tait-test/walk.hex b/tait-test/walk.hex new file mode 100644 index 0000000..4681fdc --- /dev/null +++ b/tait-test/walk.hex @@ -0,0 +1,10 @@ +:100000008601831686010A3081008312860A031056 +:100010006300860D861D08286300860C061C0C28CC +:020020000828AE +:084000000100020003000400AE +:02400E00F73F7A +:1042000043006F0070007900720069006700680069 +:1042100074002000280043002900200031003900EC +:104220003900360020004400610076006900640017 +:0A42300020005400610069007400D2 +:00000001FF