home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / intel8051 / i51xmit.asm < prev   
Assembly Source File  |  2020-01-01  |  1KB  |  69 lines

  1. $mod51
  2. $nolist
  3. $nosymbols
  4. $include(i51ctrl.inc)
  5. $include(i51hedr.inc)
  6. $list
  7.     org    codeaddr
  8. start:    jmp    main
  9. $include(i51misc.asm)
  10. $include(i51strf.asm)
  11. $include(i51rpck.asm)
  12. $include(i51spck.asm)
  13. $include(i51sakn.asm)
  14. $include(i51sprm.asm)
  15. $include(i51getv.asm)
  16. $include(i51gpkt.asm)
  17. $include(i51ncod.asm)
  18. $include(i51file.asm)
  19.  
  20. main:    call    initialize
  21.  
  22. ; send S with parameter table
  23.     mov    Typ,#'S'
  24.     call    send        ; send init string
  25.     call    getvp        ; get response
  26. ;
  27. ; send F with filename
  28.     mov    Typ,#'F'
  29.     mov    dptr,#GDA
  30.     clr    a
  31.     movx    @dptr,a
  32.     call    strcat
  33.     db    'KERMIT.CAP',0    ; default filename
  34.     call    send        ; send filename
  35.     call    getvp        ; get acknowledge
  36. ;
  37. ; send D with data
  38. sndata:    call    getpkt
  39.     jz    nmdata        ; no more data
  40.     mov    Typ,#'D'
  41.     call    send
  42.     call    getvp
  43.     jmp    sndata        ; loop
  44.     
  45. ; no more data, send Z with no data
  46. nmdata:    mov    Typ,#'Z'
  47.     mov    dptr,#GDA
  48.     clr    a
  49.     movx    @dptr,a
  50.     call    send        ; send "no more data"
  51.     call    getvp        ; get acknowledge
  52.  
  53. ; no more files, send B with no data
  54.     mov    TYP,#'B'
  55.     mov    dptr,#GDA
  56.     clr    a
  57.     movx    @dptr,a
  58.     mov    TYP,#'B'
  59.     call    send        ; send "no more files"
  60.     call    getvp        ; get acknowledge
  61.  
  62.     jmp    sys_warm
  63.  
  64. $include(i51init.asm)
  65. $include(i51data.asm)        ; ram data
  66.     end
  67.  
  68.     
  69.