> "QST" April 1997 p39: "The CPU source code file for this project is > available > at...ftp://oak.oakland.edu/pub/hamradio/arrl/qst-binaries/PRTARPTR.ZIP" > > There are more, but these are the issues I had handy. I did one recently, where I used a two bit encoding scheme. 01 Dot 11 Dash, 00 end of char. This was implemented in an '84 as a single table with entries for every morse symbol (including prosigns) that has an ascii translation. Start with the ascii value to translate, subtract an offset, and handle space (7 dot silence) outside the table. Then you scan forward in the table till you find a "00" pair, and decrement the remains of the ascii value until you hit zero. Then you're pointing at the start of the char, just read the di-bits till you hit another 00 pair. This is just something I came up with, but I couldn't see an easy way to compress the table any further. In the end, the application was 3 bytes short of full, so I didn't get too desperate :) The spacing between beeps and chars is handled by the calling routine, that's no big trick. You can imagine what fun it was constructing this table! ;************************************************************* ;Variable length morse table ;************************************************************* ; ;The resulting table is 70 bytes. ;Ascii chars from 34 to 92 are encoded, with illegals as a single 00 ; ;The comments to the right of the table list dots(*) dashes(-) and ends (X) ;Any char or prosign that BEGINS in this byte is listed to the right. A char ;may extend across one or more bytes, or two chars may begin in the same ;byte (if one of them is short or illegal(Listed as NN)!) ; ; WARNING! Check the listing file, this table MUST reside within a ; single page! (You've been warned) ; MORSETRAN: movwf TEMP ;Save W movlw 0 ;Set the !#%!(_#% page "feature" movwf PCLATH ; movfw TEMP ;Get it back addwf PCL,1 ;Back to what I came here for! ;Space and ! are not encoded in morse, and so they ;have no entry, but space is legal in ASCII. ASC2MORSE ;strips these two before calling the table. retlw B'01110101' ;*-** AF retlw B'11010000' ;-*XX NN retlw B'01010111' ;***- SX retlw B'01011100' ;**-X retlw B'00000111' ;XX*- NN NN WG retlw B'11111101' ;---* retlw B'00110111' ;X-*- KN retlw B'11010011' ;-*X- KK retlw B'01111101' ;*--* retlw B'11000001' ;-XX* NN AR retlw B'11011101' ;-*-* retlw B'00110101' ;X-** MIM retlw B'11001101' ;-X-* DU retlw B'01010101' ;**** retlw B'11000111' ;-X*- AAA retlw B'01110111' ;*-*- retlw B'00110101' ;X-** DN retlw B'11010011' ;-*X- 0 retlw B'11111111' ;---- retlw B'00011111' ;X*-- 1 retlw B'11110001' ;--X* 2 retlw B'01111111' ;*--- retlw B'00010101' ;X*** 3 retlw B'11110001' ;--X* 4 retlw B'01010111' ;***- retlw B'00010101' ;X*** 5 retlw B'01010011' ;**X- 6 retlw B'01010101' ;**** retlw B'00111101' ;X--* 7 retlw B'01010011' ;**X- 8 retlw B'11110101' ;--** retlw B'00111111' ;X--- 9 retlw B'11010011' ;-*X- OS retlw B'11110101' ;--** retlw B'01001101' ;*X-* KR retlw B'11011101' ;-*-* retlw B'00001101' ;XX-* BT retlw B'01011100' ;**-X retlw B'00010111' ;X**- IMI retlw B'11010100' ;-**X retlw B'00011100' ;X*-X A retlw B'11010101' ;-*** B retlw B'00110111' ;X-*- C retlw B'01001101' ;*X-* D retlw B'01000100' ;*X*X E retlw B'01011101' ;**-* F retlw B'00111101' ;X--* G retlw B'00010101' ;X*** H retlw B'01000101' ;*X** I retlw B'00011111' ;X*-- J retlw B'11001101' ;-X-* K retlw B'11000111' ;-X*- L retlw B'01010011' ;**X- M retlw B'11001101' ;-X-* N retlw B'00111111' ;X--- O retlw B'00011111' ;X*-- P retlw B'01001111' ;*X-- Q retlw B'01110001' ;*-X* R retlw B'11010001' ;-*X* S retlw B'01010011' ;**X- T retlw B'00010111' ;X**- U retlw B'00010101' ;X*** V retlw B'11000111' ;-X*- W retlw B'11001101' ;-X-* X retlw B'01110011' ;*-X- Y retlw B'01111100' ;*--X retlw B'11110101' ;--** Z retlw B'00000000' ;XXXX retlw B'01011111' ;**-- IQ retlw B'01110000' ;*-XX