|
8051組合語言原始碼美化效果演示 |
|
|
|
|
|
SourceFormatX 使用強大的8051組合語言詞法解析引擎全面地分析您的原始碼並根據用戶自定義的原始碼風格重構和美化8051和ASM51原始碼檔案,因此它能精細地根據不同的原始碼風格美化多種原始碼,甚至是下面這些極度混亂的原始碼:
|
這是一個非常極端的 8051 組合語言 (8051 Assembly / ASM51) 原始碼美化的範例,其目的是為了展示 SourceFormatX 8051組合語言程式碼美化工具詞法解析引擎的威力,這份混亂的ASM51原始碼檔案在1秒種內即被SourceFormatX美化和縮排成整潔的版式。
$nomod51
$include (80c515.mcu)
$include (mon_sub.inc)
homeCur equ 02h
shLfCur equ 10h
shRtCur equ 14h
start:call initlcd
call cursorof
call setbarchars
bar: call cursorup
mov a,#20h
call shwLCDbar
mov dptr,#2000
call ltime
call cursorup
mov a,#80h
call shwLCDbar
mov dptr,#2000
call ltime
call cursorup
mov a,#0ffh
call shwLCDbar
mov dptr,#2000
call ltime
jmp bar
push acc mov a,#0c0h call strcom
mov a, #2 mov b, #0 lcall placeCur4 pop acc mov b, #LCDwidth mul ab mov r4, b mov r6, b mov r5, a mov a, r4 mov r0, #5 sBar1:
jz sBar2 push acc mov a,r0
lcall lcddata pop acc dec acc sjmp sBar1 sBar2:
mov a, #LCDwidth
clr c subb a, r6 jz sBar5 mov r6, a mov r0, #' ' sBar3:
mov a,r0
lcall lcddata djnz r6, sBar4 sBar4:
ret
end
$nomod51
$include (80c515.mcu)
$include (mon_sub.inc)
homeCur equ 02h
shLfCur equ 10h
shRtCur equ 14h
start: call initlcd
call cursorof
call setbarchars
bar: call cursorup
mov A, #20h
call shwLCDbar
mov DPTR, #2000
call ltime
call cursorup
mov A, #80h
call shwLCDbar
mov DPTR, #2000
call ltime
call cursorup
mov A, #0ffh
call shwLCDbar
mov DPTR, #2000
call ltime
jmp bar
push ACC mov A, #0c0h call strcom
mov A, #2 mov B, #0 lcall placeCur4 pop ACC mov B, #LCDwidth mul AB mov R4, B mov R6, B mov R5, A mov A, R4 mov R0, #5 sBar1:
jz sBar2 push ACC mov A, R0
lcall lcddata pop ACC dec ACC sjmp sBar1 sBar2:
mov A, #LCDwidth
clr C subb A, R6 jz sBar5 mov R6, A mov R0, #' ' sBar3:
mov A, R0
lcall lcddata djnz R6, sBar4 sBar4:
ret
end
不要再浪費寶貴的時間手動整理美化ASM51和8051組合語言原始碼了! 現在就下載SourceFormatX原始碼美化工具!
|