  using "system"
  org $code
  
    mov eax, 5678
    push eax
    call [$prinum]
    
    
  mov dx, (0x3F8 + 3)
  mov al, 7
  out dx,al
  
  ;mov dx, (0x3F8 + 1)
  ;mov al, 1
  ;out dx,al
  
  mov eax, 0

  

loop1:
    mov dx, (0x3F8 + 5)
    in al,dx

    and al, 1
    je loop1
    push eax
    call [$prinum]
  mov dx, 0x3F8
  in al,dx
  push eax
  call [$prinum]
  cmp al, 0
  je done
  jmp loop1



printch:
  mov ecx, [cursor]
        mov [ecx],al
  inc ecx
  mov byte [ecx],7
  inc ecx
  mov [cursor], ecx
  ret
  out dx,al
  inc ebx
  jmp loop1

done:
  mov eax, 0
  ret

com1: dd 0x03F8
string : db "teststring", 0

cursor: dd 0xB8000









