??? 10/16/08 04:02 Read: times |
#159104 - DisAssembler D52 missing text |
Hi,
I have problem about dissasembler (by using d52.com) I disassembled this sourecode, but I found missing text. You see 'This is Text 2'. But on disassembly result it says only 'This is Text '. **************************** My Asm Code looks like this: jmp start PortA equ 2000h PortB equ 2001h PortC equ 2002h PortCW equ 2003h SetCW: push DPL push DPH mov DPTR,#PortCW movx @DPTR,A pop DPH pop DPL ret OutPortA: push DPL push DPH mov DPTR,#PortA movx @DPTR,A pop DPH pop DPL ret OutPortB: push DPL push DPH mov DPTR,#PortB movx @DPTR,A pop DPH pop DPL ret DelayClk: push 0 mov R0,#1 djnz R0,$ pop 0 ret DelayLCD: push 0 push 1 mov R1,#1 delay2: mov R0,#255 djnz R0,$ djnz R1,delay2 pop 1 pop 0 ret bitPortB: push ACC mov A,B lcall OutPortB pop ACC ret WriteInst: push B mov B,#0 ;clr DPB.0 lcall bitPortB lcall OutPortA setb B.1 lcall bitPortB lcall DelayClk; clr B.1 lcall bitPortB lcall DelayLCD; pop B ret WriteData: push B setb B.0 lcall bitPortB lcall OutPortA setb B.1 lcall bitPortB lcall DelayClk; clr B.1 lcall bitPortB lcall DelayLCD; pop B ret InitLCD: lcall DelayLCD lcall DelayLCD mov A,#38h ;//8-bit Data, 2-Line, 5x7 dotChar lcall WriteInst mov A,#0Ch ;//Display ON, Cursor OFF, Blink OFF lcall WriteInst mov A,#06h lcall WriteInst ;//Increment move, No Shift mov A,#02h ;//Return Home lcall WriteInst lcall DelayLCD mov A,#01h ;//Clear Display lcall WriteInst lcall DelayLCD ret WriteStr: push ACC LoopChr: movx A,@DPTR cjne A,#0,WriteChr ljmp ExitWriteStr WriteChr: lcall WriteData inc DPTR ljmp LoopChr ExitWriteStr: pop ACC ret start: mov A,#80h lcall SetCW lcall InitLCD mov A,#80h ;Goto Line-1 lcall WriteInst mov DPTR,#Str1 lcall WriteStr mov A,#0C0h ;Goto Line-2 lcall WriteInst mov DPTR,#Str2 lcall WriteStr jmp $ Str1: db 'This is Text 1',0 Str2: db 'This is Text 2',0 end ******************************************************** Disassembly Result looks like this: ; ; D52 V3.4.1 8052 Disassembly of LCD.HEX ; 2008/10/16 10:27 ; ORG 0 ; LJMP X00C2 ; X0003: PUSH DPL PUSH DPH MOV DPTR,#X2003 MOVX @DPTR,A POP DPH POP DPL RET ; X0010: PUSH DPL PUSH DPH MOV DPTR,#X2000 MOVX @DPTR,A POP DPH POP DPL RET ; X001D: PUSH DPL PUSH DPH MOV DPTR,#X2001 MOVX @DPTR,A POP DPH POP DPL RET ; X002A: PUSH RB0R0 MOV R0,#1 X002E: DJNZ R0,X002E POP RB0R0 RET ; X0033: PUSH RB0R0 PUSH RB0R1 MOV R1,#1 X0039: MOV R0,#0FFH X003B: DJNZ R0,X003B DJNZ R1,X0039 POP RB0R1 POP RB0R0 RET ; X0044: PUSH ACC MOV A,B LCALL X001D POP ACC RET ; X004E: PUSH B MOV B,#0 LCALL X0044 LCALL X0010 SETB B.1 LCALL X0044 LCALL X002A CLR B.1 LCALL X0044 LCALL X0033 POP B RET ; X006C: PUSH B SETB B.0 LCALL X0044 LCALL X0010 SETB B.1 LCALL X0044 LCALL X002A CLR B.1 LCALL X0044 LCALL X0033 POP B RET ; X0089: LCALL X0033 LCALL X0033 MOV A,#38H LCALL X004E MOV A,#0CH LCALL X004E MOV A,#6 LCALL X004E MOV A,#2 LCALL X004E LCALL X0033 MOV A,#1 LCALL X004E LCALL X0033 RET ; X00AF: PUSH ACC X00B1: MOVX A,@DPTR CJNE A,#0,X00B8 LJMP X00BF ; X00B8: LCALL X006C INC DPTR LJMP X00B1 ; X00BF: POP ACC RET ; X00C2: MOV A,#80H LCALL X0003 LCALL X0089 MOV A,#80H LCALL X004E MOV DPTR,#X00E2 LCALL X00AF MOV A,#0C0H LCALL X004E MOV DPTR,#X00F1 LCALL X00AF X00E0: SJMP X00E0 ; X00e2: DB 'This is Text 1' DB 0 X00f1: DB 'This is Text ' DB 32H ; ; Register/Memory Equates ; RB0R0 EQU 0 RB0R1 EQU 1 ; ; Miscellaneous equates ; ; These are addresses referenced in the code but ; which are in the middle of a multibyte instruction ; or are addresses outside the initialized space ; X2000 EQU 2000H X2001 EQU 2001H X2003 EQU 2003H ; END ; You see on X00f1 --> 'This s Text '. It should be 'This is Text 2' How to solve this problem? Thanx. |
Topic | Author | Date |
DisAssembler D52 missing text | 01/01/70 00:00 | |
Looks pretty good to me! | 01/01/70 00:00 | |
DB 0 | 01/01/70 00:00 | |
this is why the disassembler has a control file... | 01/01/70 00:00 | |
Disassembler | 01/01/70 00:00 | |
Sweeping generalisation? | 01/01/70 00:00 | |
Control file | 01/01/70 00:00 | |
clt files. | 01/01/70 00:00 | |
You should add that line to the ctl file... | 01/01/70 00:00 | |
What are you trying to do?![]() | 01/01/70 00:00 |