📄 gets.asm
字号:
;--------------------------------------------------------; File Created by SDCC : FreeWare ANSI-C Compiler; Version 2.3.0 Thu Sep 20 10:57:19 2001;-------------------------------------------------------- .module gets ;--------------------------------------------------------; Public variables in this module;-------------------------------------------------------- .globl _gets;--------------------------------------------------------; special function registers;--------------------------------------------------------;--------------------------------------------------------; special function bits ;--------------------------------------------------------;--------------------------------------------------------; internal ram data;-------------------------------------------------------- .area DSEG (DATA);--------------------------------------------------------; overlayable items in internal ram ;-------------------------------------------------------- .area OSEG (OVR,DATA);--------------------------------------------------------; indirectly addressable internal ram data;-------------------------------------------------------- .area ISEG (DATA);--------------------------------------------------------; bit data;-------------------------------------------------------- .area BSEG (BIT);--------------------------------------------------------; external ram data;-------------------------------------------------------- .area XSEG (XDATA);--------------------------------------------------------; global & static initialisations;-------------------------------------------------------- .area GSINIT (CODE) .area GSFINAL (CODE) .area GSINIT (CODE);--------------------------------------------------------; Home;-------------------------------------------------------- .area HOME (CODE) .area CSEG (CODE);--------------------------------------------------------; code;-------------------------------------------------------- .area CSEG (CODE);------------------------------------------------------------;Allocation info for local variables in function 'gets';------------------------------------------------------------;s Allocated to registers r2 r3 r4 ;c Allocated to registers r7 ;count Allocated to registers r5 r6 ; gets.c 3; -----------------------------------------; function gets; -----------------------------------------_gets: ar2 = 0x02 ar3 = 0x03 ar4 = 0x04 ar5 = 0x05 ar6 = 0x06 ar7 = 0x07 ar0 = 0x00 ar1 = 0x01; gets.c 0 mov r2,dpl mov r3,dph mov r4,b; gets.c 5 mov r5,#0x00 mov r6,#0x00; gets.c 700109$:; gets.c 8 push ar2 push ar3 push ar4 push ar5 push ar6 lcall _getchar mov r7,dpl pop ar6 pop ar5 pop ar4 pop ar3 pop ar2; gets.c 9 cjne r7,#0x08,00118$; Peephole 132 changed ljmp to sjmp sjmp 00103$00118$: cjne r7,#0x0A,00119$ ljmp 00104$00119$: cjne r7,#0x0D,00120$ ljmp 00104$00120$: ljmp 00106$; gets.c 1800103$:; gets.c 11 mov a,r5 orl a,r6; Peephole 110 removed ljmp by inverse jump logic jz 00109$00121$:; gets.c 12 mov dpl,#0x08 push ar2 push ar3 push ar4 push ar5 push ar6 push ar7 lcall _putchar pop ar7 pop ar6 pop ar5 pop ar4 pop ar3 pop ar2; gets.c 13 mov dpl,#0x20 push ar2 push ar3 push ar4 push ar5 push ar6 push ar7 lcall _putchar pop ar7 pop ar6 pop ar5 pop ar4 pop ar3 pop ar2; gets.c 14 mov dpl,#0x08 push ar2 push ar3 push ar4 push ar5 push ar6 push ar7 lcall _putchar pop ar7 pop ar6 pop ar5 pop ar4 pop ar3 pop ar2; gets.c 15 dec r2 cjne r2,#0xff,00122$ dec r300122$:; gets.c 16 dec r5 cjne r5,#0xff,00123$ dec r600123$:; gets.c 18 ljmp 00109$; gets.c 2100104$: mov dpl,#0x0D push ar2 push ar3 push ar4 push ar5 push ar6 push ar7 lcall _putchar pop ar7 pop ar6 pop ar5 pop ar4 pop ar3 pop ar2; gets.c 22 mov dpl,#0x0A push ar2 push ar3 push ar4 push ar5 push ar6 push ar7 lcall _putchar pop ar7 pop ar6 pop ar5 pop ar4 pop ar3 pop ar2; gets.c 23 mov dpl,r2 mov dph,r3 mov b,r4; Peephole 180 changed mov to clr clr a lcall __gptrput; gets.c 24 mov dpl,r2 mov dph,r3 mov b,r4; gets.c 26; Peephole 132 changed ljmp to sjmp sjmp 00111$00106$: mov dpl,r2 mov dph,r3 mov b,r4 mov a,r7 lcall __gptrput inc dptr mov r2,dpl mov r3,dph; gets.c 27 inc r5 cjne r5,#0x00,00124$ inc r600124$:; gets.c 28 mov dpl,r7 push ar2 push ar3 push ar4 push ar5 push ar6 lcall _putchar pop ar6 pop ar5 pop ar4 pop ar3 pop ar2; gets.c 30 ljmp 00109$00111$: ret .area CSEG (CODE)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -