You need to indent your program like that below. However, I believe DB is used for bytes only and you must use packing to place the word (i.e., DB 476 will not do what you want)? Others with more 16 bit processor Assembly experience might be able to offer a (better) solution in ASM.
You might want to consider using PBP's WRITECODE instead of the ASM for the initial write. Look here http://www.picbasic.co.uk/forum/show...ight=writecode and also search “WRITECODE” on this forum for examples of how to write to the 18F family, which is not as straight forward as one might think.
Code:
Asm
CODE 1400
DB 0
DB 220
DB 476
DB 384
DB 384
DB 476
DB 220
DB 0
DB 999
Endasm
Good Luck
edit: or consider LOOKUP2 tables
Last edited by paul borgmeier; - 3rd September 2006 at 08:29.
Reason: added option?
Paul Borgmeier
Salt Lake City, UT
USA
__________________
Bookmarks