This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Serial window 1

I am using microvision2 (UV2)environment.
when i use the following code from examples(given by keil) i see "hello world" in the serial window, when i use degugger.

#include <REG52.H>
#include <stdio.h>
#ifdef MONITOR51
char code reserve [3] _at_ 0x23;
#endif

void main (void) {

#ifndef MONITOR51
SCON = 0x50;
TMOD = 0x20;
TH1 = 221;
TR1 = 1;
TI = 1;
#endif

while (1) {
printf ("Hello World\n");
}
}

But when i run my code written in assembly(shown below) does not give any output on serial window.
org 00
mov scon,#52h
mov tmod,#20h
mov th1,#221
setb tr1
setb t1
loop: mov A,#1
mov SBuf,A
jmp loop
end

Pl point me my mistake. suggest remedial measures.

0