Results 1 to 3 of 3

Thread: Problems when sending bytes on COM1

  1. #1
    stefano
    Guest

    Exclamation

    Hi,
    I have done the following program:


    Code:
    ; Programma per l'invio di un carattere alla porta seriale
    
    DSeg SEGMENT PARA 'DATI'
            Parola DB 00h
    DSeg ENDS
    
    SSeg SEGMENT PARA STACK 'STACK'
            DB 100 DUP (?)
            Top LABEL WORD
    SSeg ENDS
    
    CSeg SEGMENT PARA 'CODICE'
           Inizio:
            ASSUME DS:DSeg,SS:SSeg,CS:CSeg
            ;Inizializzazione dei registri
            MOV AX,DSeg
            MOV DS,AX
            LEA AX,Top
            MOV SP,AX
            MOV AX,SSeg
            MOV SS,AX
    
            ;inizializzazione porta
            MOV AH,00h
            ;baud rate      110 baud
            ;parit…         nessuna
            ;codice stop    1 bit
            ;carattere      8 bit
            MOV AL,00000011b
            MOV DX,0  ;seleziona la porta COM1
            INT 14h
    
            ;trasmissione byte
          Trasmetto:  
            MOV AH,01h
            MOV AL,Parola
            INT 14h
            MOV AH,01h
            INT 16h
            JZ Trasmetto
    
            ;svuoto il buffer della tastiera
            MOV AH,00h
            INT 16h
            
            ;Ritorno al DOS
            MOV AL,00h
            MOV AH,4Ch
            INT 21h
    
    CSeg ENDS
    END Inizio
    When I try to read the voltage with a tester I can't view any variation! Is there an error?

    Thank you!

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Dunmow,Essex,England
    Posts
    898
    You need an assembler forum NOT a VB one.

  3. #3
    stefano
    Guest
    Thank you for the information!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width