Eric,
Yes, I want to do this in Oshon basic.
ASM is an option, but the possibility to create an array of const bytes would be a nice feature to the oshon basic language.
The code and it´s variations is something like this:
option 1) dim v(500) as byte - There is a limit of 255 bytes for arrays and even using only 255, there is no sufficient space for 500 bytes in ram(PIC16f88).
option 2) const v(500)=(1,23,34,...25) (500 numbers) - does not exist, but this its what I need...
option 3) v=lookup(1,23,34....,25),i (500 numbers) I do not know if it supports arrays greater than 255 and it´s slow to retrieve the data(for my application).
option4) the ugliest, but the quickest, see below
The main code is simple retrieve the data from the array and output to portb, to feed a R2R DAC.
loop:
for i =0 to 499
PORTB =v(i)
next i
goto loop
code for option 4)
loop:
portb=1
portb=23
portb=34
.
500 lines
.
.
goto loop