Hardware Reference
In-Depth Information
Im Unterprogramm „bcd8toascii“ werden die Ergebnisse der decimalxL-Stelle in
einen ASCII-String umgewandelt und vom Response Formatter in den Ausgangs-
speicher geschrieben. Im Beispielgerät ist der Ausgangsspeicher gleichbedeutend
mit dem Speicherbereich des Bulk-IN Endpoints.
; convert a three digit packed BCD value to ascii and send it to the response
formatter
bcd8toascii
movlw 0x0F
andwf decimalbH,0
movwf BULKIN
movlw 0x30
addwf BULKIN,1
call ResponseByte
swapf decimalbL
movlw 0x0F
andwf decimalbL,0
movwf BULKIN
movlw 0x30
addwf BULKIN,1
call ResponseByte
swapf decimalbL
movlw 0x0F
andwf decimalbL,0
movwf BULKIN
movlw 0x30
addwf BULKIN,1
call ResponseByte
movlw ';'
movwf BULKIN
call ResponseByte
; set MAV in STB
bsf
STB,MAV
return
Search WWH ::




Custom Search