Which device are you using?
I compiled two different version and looked at the .lst and with my limited understanding of assembly I'd say it "should work"
First, HSEROUT [STR Buffer\16]
Here it takes the literal 16 and moves it to the low byte (I think) of system variable R4.Code:movlw low (010h) movwf R4 + 1 movlw low (low (HSEROUTJ)) movwf R8 clrf (R8) + 1 clrf R2 + 1 movlw low (low (_Buffer)) call SEROUT2STRN
Second, HSEROUT [STR Buffer\Length]
Here it takes the Length variable, and loads THAT to the low byte (I think) of system variable R4.Code:movf _Length, W movwf R4 + 1 movlw low (low (HSEROUTJ)) movwf R8 clrf (R8) + 1 clrf R2 + 1 movlw low (low (_Buffer)) call SEROUT2STRN
In the actual serout macro it then decrements R4 to determine when it's done.




Bookmarks