Good job guy. i just want to remind you something. Every time a macro is called, that duplicate his whole code. so, by using the following
Code:
asm
TX_Sample macro index
MOVE?WW index, TXIndex
L?CALL TXnow
endm
TXnow
ENDASM
TXData = TXArray[TXIndex]
Hserout [TXData / 100, TXData // 100]
RETURN
this will generate less code everytime you call the macro.
Here's another method to send a specific index of Word array var.
Code:
DEFINE LOADER_USED 1
DEFINE OSC 20
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h
DEFINE HSER_SPBRG 129 ' 9600 Bauds
TXData var WORD SYSTEM
aVar var word[4] SYSTEM
avar[0]=0
avar[1]=100
avar[2]=1000
avar[3]=10000
goto start
asm
Usend macro index
MOVE?WW aVar + (index*2) , TXData
L?CALL TXnow
endm
TXnow
ENDASM
Hserout [dec TXData,13,10]
RETURN
start:
@ Usend 0
@ Usend 1
@ Usend 2
@ Usend 3
pause 500
goto start
there's probably tons of way like using AOUT?xxx macro too.. well still unsure of that one AOUT?xxx
Bookmarks