first of all, i am using windows xp, and i am using nasm to assemble my code, and djgpp to compile it with driver.c
what i basically want to do is do a chat thing using serial ports, pretty much like Choink23 is trying to do in another thread.
here's the code i've done so far:
segment .text global _asm_main _asm_main: enter 0,0 pusha mov dx, 0 ;send 'a' through com1 mov al, 'a' mov ah, 1 int 14h mov ah,3 ;check serial port status int 14h ;to check if data is available shr ax,9 ;puts bit8 to the carryflag jc fetch ;if bit8=1, fetch jnc cont ;data is not available fetch: mov dx, 1 ;receives 'a' from com2 mov ah, 2 int 14h mov dl, al ;prints the received charac mov ah, 02h int 21h cont: popa mov eax, 0 leave ret
this code is not printing anything! i'm not sure if something's wrong with the cable, or something's wrong in the backside of my cpu, or something's wrong with my code. pls help me! thanks