home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / modem / break.asm < prev    next >
Assembly Source File  |  1984-11-10  |  911b  |  60 lines

  1.     ;
  2.     ;    Subroutine to send BREAK pulse
  3.     ;    using a 8251 UART
  4.     ;
  5.     ;    Destroys registers A, HL
  6.     ;
  7.     ;    Labels:
  8.     ;
  9.     ;    SIOSPT - UART status port
  10.     ;    TIME   - BREAK pulse timer
  11.     ;    BREAK  - Call address
  12.     ;    BREAK1   
  13.     ;
  14.  
  15.     SIOSPT    EQU    ______
  16.  
  17.     ;
  18.     ;    Serial status port
  19.     ;
  20.     ;
  21.  
  22.     TIME    EQU    01EFFH
  23.  
  24.     ;
  25.     ;    used to time BREAK pulse
  26.     ;
  27.     ;    For 2 MHZ try 01EFFH
  28.     ;    For 4 MHZ try 01000H
  29.     ;
  30.  
  31. BREAK    MVI    A,03FH
  32.  
  33.     ;
  34.     ;Sets UART as follows:
  35.     ;
  36.     ;BIT    description
  37.     ;
  38.     ; 0    Transmit enable true (1)
  39.     ; 1    Data terminal ready true (1)
  40.     ; 2    Receive enable true (1)
  41.     ; 3    Set BREAK pulse (1)
  42.     ; 4    Error reset true (1)
  43.     ; 5     Request to send true (1)
  44.     ; 6    Internal reset false (0)
  45.     ; 7    Sync search mode (not used)(0)
  46.     ;
  47.  
  48.     OUT    SIOSPT    ;Write to UART
  49.     LXI    H,TIME    ;Load timer
  50. BREAK1    DCX    H    ;decrement HL pair
  51.     MOV    A,H        
  52.     CPI    0
  53.     JNZ    BREAK1    ;Not done yet
  54.     MOV    A,L
  55.     CPI    0
  56.     JNZ    BREAK1    ;Still not done
  57.     MVI    A,037H    ;Clear BREAK pulse
  58.     OUT    SIOSPT    ;Write to UART
  59.     RET
  60.