Thread: Mk14 vdu
View Single Post
Old 29th Sep 2020, 8:55 am   #242
Karen O
Rest in Peace
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
Default Re: Mk14 vdu

PICs tend to have large amounts of program flash compared to other types of memory. This permits a very verbose style of coding that enables 'hard-wired' code to replace the more traditional program loop and indirection. For example, if I were feeding eight graphics bytes to the serial port:

MOVF BUF+0,W
MOVWF TXREG
..
..
MOVF BUF+1,W
MOVWF TXREG
..
..
MOVF BUF+2,W
MOVWF TXREG
..
..
MOVF BUF+3,W
MOVWF TXREG
..
..
etc.

Indirection on the PIC is so rudimentary as to be nearly absent. I use it occasionally but generally I use repeated hard-coded methods. Who cares if the final program is big as a result?
Karen O is offline