home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / emulator / cpm / read.asm < prev    next >
Encoding:
Assembly Source File  |  1985-11-19  |  2.3 KB  |  94 lines

  1. ;****************************************************************
  2. ;*                                *
  3. ;*    >>>>>>> S o f t D e s i g n <<<<<<<            *
  4. ;*                                *
  5. ;* self relocating receiver routine                *
  6. ;* for serial data transmission via cp/m reader channel        *
  7. ;* allows binary file transfer from host computer        *
  8. ;* by terminating file with five times eof            *
  9. ;* message is stored in tpa for save command            *
  10. ;*                                *
  11. ;****************************************************************
  12.  
  13. ; usage:
  14.  
  15. ; enter program code on receiving computer
  16. ; using ddtz inline assembler with "a100" command
  17. ; or in hex using ddtz "s100" command.
  18. ; exit from ddtz to cpmz80 system by "g0" command.
  19.  
  20. ; save as file read.com
  21. ; with "save 1 read.com" cpmz80 command.
  22.  
  23. ; adjust transmission line parameters (baud rate, stop bits, parity)
  24. ; on sending and receiving computer.
  25.  
  26. ; start read.com on receiving machine.
  27.  
  28. ; to send file x:yyyyyyyy.zzz execute on sending machine
  29. ; "pip pun:=x:yyyyyyyy.zzz[o],eof:,eof:,eof:,eof:,eof:".
  30.  
  31. ; save file on receiving machine
  32. ; with "save n x:yyyyyyyy.zzz" command.
  33.  
  34.  
  35. ; 100   21 0E 01 11  80 00 01 1C  00 ED B0 C3  80 00 21 00   !........m0C..!.
  36. ; 110   01 1E 05 E5  D5 0E 03 CD  05 00 D1 E1  77 23 FE 1A   ...eU..M..Qaw#~.
  37. ; 120   28 04 1E 05  18 ED 1D 20  EA C7 00 00  00 00 00 00   (....m. jG......
  38. ; 130   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ................
  39. ; 140   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ................
  40. ; 150   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ................
  41. ; 160   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ................
  42. ; 170   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ................
  43.  
  44.  
  45.  
  46.     .Z80
  47.     ASEG
  48.     ORG    0100H
  49.  
  50.  
  51. BDOS    EQU    0005H
  52. TPA    EQU    0100H
  53. START    EQU    0080H
  54.  
  55. PROLEN    EQU    PROEND - PROGRM
  56.  
  57. EOF    EQU    1AH
  58.  
  59.  
  60.  
  61. READ:    LD    HL,PROGRM
  62.     LD    DE,START
  63.     LD    BC,PROLEN
  64. RELOCT: LDIR            ;relocate receiver program
  65.     JP    START
  66.  
  67.  
  68. PROGRM: LD    HL,TPA        ;receiver program
  69.     LD    E,5
  70.  
  71. GETCHR: PUSH    HL
  72.     PUSH    DE
  73.     LD    C,3
  74.     CALL    BDOS        ;get reader character
  75.     POP    DE
  76.     POP    HL
  77.  
  78.     LD    (HL),A
  79.     INC    HL
  80.  
  81. ENDFL?: CP    EOF
  82.     JR    Z,ISEOF
  83.     LD    E,5
  84.     JR    GETCHR
  85.  
  86. ISEOF:    DEC    E
  87.     JR    NZ,GETCHR
  88.  
  89.  
  90. EXIT:    RST    0
  91.  
  92.  
  93. PROEND: END
  94. ə