I
ITP
Guest
Hei Alle,
Jeg står foran et merkelig problem med k * E * i * l.For en "hvis"-uttalelse i C it
genererer en ubetinget hopp (LJMP) undervisning.Men når jeg legger en dummy
statement [while (! STOP_KEY_PORT)] det fungerer.
Nedenfor har jeg vist en del av meg C * 51 program og dets tilhørende K * E * i * l
utgang.
Erklæringen for to litt variabel som brukes er som følgersbit STOP_KEY_PORT = P1 ^ 5;
sbit velocity_in = P2 ^ 3;------------------------ START -----------------------
/ / Original C-kode
(
P1 = 0x0f0;
velocity_in = 1;
while (! velocity_in)
(
if (! STOP_KEY_PORT) goto abort;
)
while (velocity_in)
(
if (! STOP_KEY_PORT) goto abort;
)
)K * E * i * l output:758: P1 = 0x0f0;
C: 0x0CA8 7590F0 MOV P1 (0x90), # adc_data (0xF0)
759: velocity_in = 1;
760:
C: 0x0CAB D2B4 SETB velocity_in (0xB0.4)
761: while (! Velocity_in)
C: 0x0CAD 20B403 JB velocity_in (0xB0.4), C: 0CB3
762: (
763: if (! STOP_KEY_PORT) goto abort;
C: 0x0CB0 020D80 LJMP C: 0D80
764
765: while (velocity_in)
C: 0x0CB3 30B403 JNB velocity_in (0xB0.4), C: 0CB9
766: (
767: if (! STOP_KEY_PORT) goto abort;
C: 0x0CB6 020D80 LJMP C: 0D80
768
769
---------------------------- END --------------------- ----------
--------------------------- START ---------------------- --------
/ / C Code etter introduksjonen av setningen [while (! STOP_KEY_PORT)](
P1 = 0x0f0;
velocity_in = 1;
while (! STOP_KEY_PORT); / / <- nylig innført linje
while (! velocity_in)
(
if (! STOP_KEY_PORT) goto abort;
)
while (velocity_in)
(
if (! STOP_KEY_PORT) goto abort;
)
)K * E * i * l output:
758: P1 = 0x0f0;
C: 0x0B0B 7590F0 MOV P1 (0x90), # adc_data (0xF0)
759: velocity_in = 1;
C: 0x0B0E D2B4 SETB velocity_in (0xB0.4)
760: while (! STOP_KEY_PORT);
C: 0x0B10 3095FD JNB STOP_KEY_PORT (0x90.5), C: 0B10
761: while (! Velocity_in)
C: 0x0B13 20B406 JB velocity_in (0xB0.4), C: 0B1C
762: (
763: if (! STOP_KEY_PORT) goto abort;
C: 0x0B16 2095FA JB STOP_KEY_PORT (0x90.5), C: 0B13
C: 0x0B19 020BF2 LJMP C: 0BF2
764
765: while (velocity_in)
C: 0x0B1C 30B406 JNB velocity_in (0xB0.4), C: 0B25
766: (
767: if (! STOP_KEY_PORT) goto abort;
C: 0x0B1F 2095FA JB STOP_KEY_PORT (0x90.5), C: 0B1C
C: 0x0B22 020BF2 LJMP C: 0BF2
768
769
--------------------------- END ---------------------- ------Vennlige hjelpe meg å forstå dette problemet.
Takk for tiden din.
ITP.
Sist endret av ITP den 07. Sep 2003 10:17, endret 1 gang totalt
Jeg står foran et merkelig problem med k * E * i * l.For en "hvis"-uttalelse i C it
genererer en ubetinget hopp (LJMP) undervisning.Men når jeg legger en dummy
statement [while (! STOP_KEY_PORT)] det fungerer.
Nedenfor har jeg vist en del av meg C * 51 program og dets tilhørende K * E * i * l
utgang.
Erklæringen for to litt variabel som brukes er som følgersbit STOP_KEY_PORT = P1 ^ 5;
sbit velocity_in = P2 ^ 3;------------------------ START -----------------------
/ / Original C-kode
(
P1 = 0x0f0;
velocity_in = 1;
while (! velocity_in)
(
if (! STOP_KEY_PORT) goto abort;
)
while (velocity_in)
(
if (! STOP_KEY_PORT) goto abort;
)
)K * E * i * l output:758: P1 = 0x0f0;
C: 0x0CA8 7590F0 MOV P1 (0x90), # adc_data (0xF0)
759: velocity_in = 1;
760:
C: 0x0CAB D2B4 SETB velocity_in (0xB0.4)
761: while (! Velocity_in)
C: 0x0CAD 20B403 JB velocity_in (0xB0.4), C: 0CB3
762: (
763: if (! STOP_KEY_PORT) goto abort;
C: 0x0CB0 020D80 LJMP C: 0D80
764
765: while (velocity_in)
C: 0x0CB3 30B403 JNB velocity_in (0xB0.4), C: 0CB9
766: (
767: if (! STOP_KEY_PORT) goto abort;
C: 0x0CB6 020D80 LJMP C: 0D80
768
769
---------------------------- END --------------------- ----------
--------------------------- START ---------------------- --------
/ / C Code etter introduksjonen av setningen [while (! STOP_KEY_PORT)](
P1 = 0x0f0;
velocity_in = 1;
while (! STOP_KEY_PORT); / / <- nylig innført linje
while (! velocity_in)
(
if (! STOP_KEY_PORT) goto abort;
)
while (velocity_in)
(
if (! STOP_KEY_PORT) goto abort;
)
)K * E * i * l output:
758: P1 = 0x0f0;
C: 0x0B0B 7590F0 MOV P1 (0x90), # adc_data (0xF0)
759: velocity_in = 1;
C: 0x0B0E D2B4 SETB velocity_in (0xB0.4)
760: while (! STOP_KEY_PORT);
C: 0x0B10 3095FD JNB STOP_KEY_PORT (0x90.5), C: 0B10
761: while (! Velocity_in)
C: 0x0B13 20B406 JB velocity_in (0xB0.4), C: 0B1C
762: (
763: if (! STOP_KEY_PORT) goto abort;
C: 0x0B16 2095FA JB STOP_KEY_PORT (0x90.5), C: 0B13
C: 0x0B19 020BF2 LJMP C: 0BF2
764
765: while (velocity_in)
C: 0x0B1C 30B406 JNB velocity_in (0xB0.4), C: 0B25
766: (
767: if (! STOP_KEY_PORT) goto abort;
C: 0x0B1F 2095FA JB STOP_KEY_PORT (0x90.5), C: 0B1C
C: 0x0B22 020BF2 LJMP C: 0BF2
768
769
--------------------------- END ---------------------- ------Vennlige hjelpe meg å forstå dette problemet.
Takk for tiden din.
ITP.
Sist endret av ITP den 07. Sep 2003 10:17, endret 1 gang totalt