diff options
author | Christian Pointner <equinox@mur.at> | 2011-07-22 22:45:24 +0000 |
---|---|---|
committer | Christian Pointner <equinox@mur.at> | 2011-07-22 22:45:24 +0000 |
commit | 3688b148aa04345e9fa5641b442926d542b2ee4c (patch) | |
tree | 68804292805d980328086a9a6794f482ddb1d9e6 | |
parent | first version of base32 encoder (not working yet) (diff) |
RFC3548 compliant base32 coding works now
git-svn-id: https://svn.spreadspace.org/mur.sat@36 7de4ea59-55d0-425e-a1af-a3118ea81d4c
-rw-r--r-- | software/ttx/ttx.asm | 78 |
1 files changed, 33 insertions, 45 deletions
diff --git a/software/ttx/ttx.asm b/software/ttx/ttx.asm index ee94de7..5fd15d4 100644 --- a/software/ttx/ttx.asm +++ b/software/ttx/ttx.asm @@ -44,7 +44,7 @@ ESPACE EQU .256 - .29 CSPACE EQU .256 - .87 WSPACE EQU .256 - .203 ENABLE_TIME EQU .256 - .10 -BEACON_INT EQU .5 ; *2 = Beacon Interval in seconds +BEACON_INT EQU .10 ; *2 = Beacon Interval in seconds ;; I/O Pins CWENABLE EQU GP0 @@ -276,7 +276,6 @@ getcwlen ;; Base32 Code base32 addwf PCL,f - nop retlw 'A' - ' ' retlw 'B' - ' ' retlw 'C' - ' ' @@ -388,8 +387,10 @@ send_base32 movwf PENTLECNT case0 - movf INDF,w + rrf INDF,w movwf PENTLE0 + rrf PENTLE0,f + rrf PENTLE0,w andlw b'00011111' call base32 call send_char @@ -400,17 +401,17 @@ case0 case1 movlw CSPACE call dottime - swapf PENTLE0,f - rrf PENTLE0,w - andlw b'00000111' + rlf INDF,w + movwf PENTLE0 + rlf PENTLE0,w + andlw b'00011100' movwf PENTLE0 incf FSR,f - movf INDF,w + swapf INDF,w movwf PENTLE1 - rlf PENTLE1,f - rlf PENTLE1,f - rlf PENTLE1,w - andlw b'00011000' + rrf PENTLE1,f + rrf PENTLE1,w + andlw b'00000011' iorwf PENTLE0,w call base32 call send_char @@ -421,10 +422,7 @@ case1 case2 movlw CSPACE call dottime - movf INDF,w - movwf PENTLE0 - rrf PENTLE0,f - rrf PENTLE0,w + rrf INDF,w andlw b'00011111' call base32 call send_char @@ -435,16 +433,12 @@ case2 case3 movlw CSPACE call dottime - rrf PENTLE0,f - rrf PENTLE0,f - swapf PENTLE0,w - andlw b'00000001' + swapf INDF,w + andlw b'00010000' movwf PENTLE0 incf FSR,f - movf INDF,w - movwf PENTLE1 - rlf PENTLE1,w - andlw b'00011110' + swapf INDF,w + andlw b'00001111' iorwf PENTLE0,w call base32 call send_char @@ -455,12 +449,12 @@ case3 case4 movlw CSPACE call dottime - swapf INDF,w - andlw b'00001111' + rlf INDF,w + andlw b'00011110' movwf PENTLE0 incf FSR,f - btfsc INDF,0 - bsf PENTLE0,4 + btfsc INDF,7 + bsf PENTLE0,0 movf PENTLE0,w call base32 call send_char @@ -471,7 +465,7 @@ case4 case5 movlw CSPACE call dottime - movf INDF,w + rrf INDF,w movwf PENTLE0 rrf PENTLE0,w andlw b'00011111' @@ -486,16 +480,14 @@ case6 call dottime swapf INDF,w movwf PENTLE0 - rrf PENTLE0,f rrf PENTLE0,w - andlw b'00000011' + andlw b'00011000' movwf PENTLE0 incf FSR,f - movf INDF,w + swapf INDF,w movwf PENTLE1 - rlf PENTLE1,f - rlf PENTLE1,f - andlw b'00011100' + rrf PENTLE1,w + andlw b'00000111' iorwf PENTLE0,w call base32 call send_char @@ -507,10 +499,6 @@ case7 movlw CSPACE call dottime movf INDF,w - movwf PENTLE0 - rrf PENTLE0,f - rrf PENTLE0,f - rrf PENTLE0,w andlw b'00011111' call base32 call send_char @@ -539,19 +527,19 @@ send_beacon movlw WSPACE call dottime - movlw b'01010101' - movwf BUF movlw b'10101010' + movwf BUF + movlw b'01010101' movwf BUF + 1 - movlw b'11110000' - movwf BUF + 2 movlw b'00001111' + movwf BUF + 2 + movlw b'11110000' movwf BUF + 3 - movlw b'00111100' - movwf BUF + 4 movlw b'11000011' + movwf BUF + 4 + movlw b'00111100' movwf BUF + 5 - movlw b'10101010' + movlw b'01011111' movwf BUF + 6 movlw BUF |