diff options
Diffstat (limited to 'demo/demo1.lst')
-rw-r--r-- | demo/demo1.lst | 74 |
1 files changed, 42 insertions, 32 deletions
diff --git a/demo/demo1.lst b/demo/demo1.lst index 25d0ef4..687181e 100644 --- a/demo/demo1.lst +++ b/demo/demo1.lst @@ -1,12 +1,12 @@ -demo1 DEMO 2 36/-4/1907 PAGE 1 - 1 ; MCU 8051 IDE - Demostration code +demo1 DEMO 2 11/29/1182 PAGE 1 + 1 ; MCU 8051 IDE - Demonstration code 2 ; Macro instructions, conditional compilation and constants 3 ; Try tab "Graph" on bottom panel 4 5 ; Press F2 and F6 to run the program (start simulator and animate) 6 7 $TITLE('DEMO 2') ; Set title for code listing - 8 $DATE(36/-4/1907) ; Set date for code listing + 8 $DATE(11/29/1182) ; Set date for code listing (the 29th of November 1182, welcome back to the M 9 10 ; Constant definitions 11 ; -------------------- @@ -15,12 +15,12 @@ demo1 DEMO 2 0001 14 inc_dec equ 100 / X ; Flag: Increment/Decrement counter 15 16 cseg at 1FFh ; Code segment starts at 0x1FF - 17 something: db 4d ; Reserve 4 bytes in this segment +01FF 04 17 something: db 4d ; Reserve 4 bytes in this segment 18 19 ; Macro instructions 20 ; -------------------- 21 - 22 ;; Shift the given registeres + 22 ;; Shift the given registers 23 shift macro reg0, reg1 24 25 ; Increment / Decrement counter @@ -42,40 +42,50 @@ demo1 DEMO 2 42 mov reg0, A 43 endm 44 - 45 ; Program initilization + 45 ; Program initialization 46 ; -------------------- -0000 75900F 47 org 0h -0002 75B01E 48 sjmp start + 47 org 0h +****WARNING: This ORG has lower value than the previous one +0000 8000 48 sjmp start 49 50 ; Program start 51 ; -------------------- -0005 8000 52 start: mov P1, #00Fh -0008 E50F 53 mov P3, #01Eh - 54 +1 sjmp main - 55 +1 -000A 04 56 +1 mov a, counter -000C F50F 57 +1 inc a -000D 8590B0 58 +1 mov counter, a +0002 75900F 52 start: mov P1, #00Fh +0005 75B01E 53 mov P3, #01Eh +0008 8000 54 sjmp main + 55 + 56 ; Main loop + 57 ; -------------------- + 58 +1 main: shift P1, P3 59 +1 -000F 85B090 60 +1 mov p3, p1 -0012 D3 61 +1 mov p1, p3 -0015 E590 62 +1 setb c -0016 23 63 +1 mov a, p1 -0018 F590 64 +1 rl a -0019 80ED 65 +1 mov p1, a - 66 - 67 ; Main loop - 68 ; -------------------- - 69 main: shift P1, P3 - 70 sjmp main - 71 - 72 ; Program end - 73 ; -------------------- - 74 end -ASSEMBLY COMPLETE, NO ERRORS FOUND, NO WARNINGS +000A E50F 60 +1 mov a , counter + 61 +1 if inc_dec <> 0 +000C 04 62 +1 inc a + 63 +1 else + 64 +1 dec a + 65 +1 endif +000D F50F 66 +1 mov counter , a + 67 +1 +000F 8590B0 68 +1 mov P3 , P1 +0012 85B090 69 +1 mov P1 , P3 +0015 D3 70 +1 setb c +0016 E590 71 +1 mov a , P1 +0018 23 72 +1 rl a +0019 F590 73 +1 mov P1 , a +001B 80ED 74 sjmp main + 75 + 76 ; Program end + 77 ; -------------------- + 78 end +ASSEMBLY COMPLETE, NO ERRORS FOUND, 1 WARNING +ERROR SUMMARY: +Line 49, WARNING: This ORG has lower value than the previous one + SYMBOL TABLE: +??MCU_8051_IDE . . . . . . . . . . . N NUMB 8051H NOT USED +??VERSION. . . . . . . . . . . . . . N NUMB 0147H NOT USED AC . . . . . . . . . . . . . . . . . B ADDR 00D6H NOT USED ACC. . . . . . . . . . . . . . . . . D ADDR 00E0H NOT USED ACSR . . . . . . . . . . . . . . . . D ADDR 0097H NOT USED @@ -221,7 +231,7 @@ SINT . . . . . . . . . . . . . . . . C ADDR 0023H NOT USED SM0. . . . . . . . . . . . . . . . . B ADDR 009FH NOT USED SM1. . . . . . . . . . . . . . . . . B ADDR 009EH NOT USED SM2. . . . . . . . . . . . . . . . . B ADDR 009DH NOT USED -SOMETHING. . . . . . . . . . . . . . C ADDR 001DH NOT USED +SOMETHING. . . . . . . . . . . . . . C ADDR 01FFH NOT USED SP . . . . . . . . . . . . . . . . . D ADDR 0081H NOT USED SPCON. . . . . . . . . . . . . . . . D ADDR 00C3H NOT USED SPCR . . . . . . . . . . . . . . . . D ADDR 00D5H NOT USED |