home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / BEEHIVE / COMMS / ZMP-OV16.ARC / ZMO-AL04.Z80 < prev    next >
Text File  |  1991-02-02  |  16KB  |  695 lines

  1. ;
  2. ; Altos 8000/Series 5/model 580 overlay file for ZMP          Nov 24, 88
  3. ;
  4. ; ALTOS uses the Z80 SIO & 8430 CTC timer
  5. ;
  6. ;   The Altos Series 5 (or 580) running Cp/m 2.23s1 uses a bank-switched
  7. ;   bios that heavily uses the ix and iy registers. This creates a severe
  8. ;   conflict with the runtime package used by ZMP. The program will not
  9. ;   run unless the altos bios is patched to save the ix and iy registers
  10. ;   before any bank switch and restoring the registers after returning
  11. ;   from the switch. This cannot be done by pushing the registers onto
  12. ;   the stack.
  13. ;   A simple patch can be made that saves the ix and iy registers
  14. ;   to memory and restores them after bios calls. A sample code listing
  15. ;   is at the end of this file.
  16. ;
  17. ;-----------------------------------------------------------------------
  18. ;       Name:  ZMO-AL04.Z80
  19. ;
  20. ;       Dated Nov 22, 1988
  21. ;
  22. ;    Written by - Ron Murray, c/o Z-Node 62, 061-9-450-0200
  23. ;             Perth, Western Australia.
  24. ;
  25. ;       Modified to ZMP v1.4 standard Ken Reid    Nov 24, 88
  26. ;       Modified to ZMP v1.3 standard Ken Reid    Oct 17, 88
  27. ;    Modified to ZMP v1.2 standard Ron Murray Sept 15, 88
  28. ;
  29. ;-----------------------------------------------------------------------
  30. ;
  31. ;    System-dependent code overlay for ZMODEM
  32. ;
  33. ;   Insert your own code as  necessary    in  this  file.  Code  contained
  34. ; herein  has been written in Z80 code for use with M80 or SLR. Assemble
  35. ; as follows:
  36. ;
  37. ;    SLR ZMO-AL04/h
  38. ;    MLOAD ZMP.COM=ZMPX.COM,ZMO-AL04
  39. ;  or
  40. ;    M80 =ZMO-MH04.Z80
  41. ;    RELHEX ZMO-MH04
  42. ;    MLOAD ZMP.COM=ZMPX.COM,ZMO-AL04
  43. ;
  44. ;
  45. ; (Don't use L80 without changing the source  for  assembly  as  a  CSEG
  46. ; file.)
  47. ;
  48. ;-----------------------------------------------------------------------
  49. ;
  50. ; Notes on modifying this file:
  51. ;
  52. ;    C    requires  that functions do not change either index register (IX
  53. ; or IY). If your overlay requires either of these to be changed, ensure
  54. ; they are restored to the original values on return.
  55. ;
  56. ;    Since  collecting    parameters  from C functions can be tricky, only
  57. ; change the parts marked 'Insert your own code here'. Do NOT modify the
  58. ; jump table at the start. Do NOT modify the entry/exit sections of each
  59. ; function. Do NOT pass 'GO'. Do NOT collect $200.
  60. ;
  61. ;    Apart  from  defining  modem  functions,  this  file  also  defines
  62. ; terminal characteristics. Examples provided are for ADM-3A (with a few
  63. ; of my own additions). Modify to suit    your  own  terminal.  An  inline
  64. ; print routine is provided for printing strings in the usual way, usage
  65. ; is:
  66. ;
  67. ;              CALL    PRINT
  68. ;              DB    'required string',0
  69. ;
  70. ;-----------------------------------------------------------------------
  71. ;
  72. ;    Don't forget to set your clock speed at the clkspd variable.
  73. ;
  74. ;    If you find  your    overlay  exceeds  the  maximum    size  (currently
  75. ; 0400h),  you    will have to contact me for another version. If too many
  76. ; people need to do it, we haven't allowed enough room.
  77. ;
  78. ; Ron Murray Aug 15, 88
  79. ;
  80. ;-----------------------------------------------------------------------
  81. ;
  82. NO    EQU    0
  83. YES    EQU    NOT NO
  84. ;
  85. ; User-set variables
  86. ;
  87. CLKSPD    EQU    4        ; Processor clock speed in MHz
  88. DEBUG    EQU    NO
  89. ;
  90. ;Set the following two equates to the drive and user area which will contain
  91. ;   ZMP's .OVR files, .CFG file, .FON file and .HLP file. Set both to zero
  92. ;   (null) to locate them on the drive from which ZMP was invoked.
  93.  
  94. OVERDRIVE      EQU     'A'     ; Drive to find overlay files on ('A'-'P')
  95. OVERUSER       EQU     0       ; User area to find files
  96. ;
  97. USERDEF EQU     0145H           ; Origin of this overlay.  This address
  98. ;                ;   may change with subsequent revisions
  99. ; NOT user-set variables
  100. ;
  101. MSPEED  EQU     03CH            ; Location of current baud rate. 3C is normal
  102. OVSIZE    EQU    0400H        ; Max size of this overlay
  103. ;
  104.     .Z80            ; Use z80 code
  105.     ASEG            ; Absolute
  106. ;
  107.      IF    DEBUG
  108.     ORG    100H        ; So you can debug it with CEBUG, ZSID,
  109. ;                ;   etc.
  110.      ELSE
  111.     ORG    USERDEF
  112.      ENDIF            ; DEBUG
  113. ;
  114. ESC    EQU    1BH
  115. CTRLQ    EQU    11H
  116. CR    EQU    0DH
  117. LF    EQU    0AH
  118. BDOS    EQU    5
  119. ;
  120. ;
  121. ; Select one of the following two choices for your computer
  122. ;
  123. A8000   EQU     NO      ; Altos 8000 series
  124. SER5    EQU     YES     ; Altos series 5
  125. ;
  126. ;
  127.      IF    A8000
  128. PORT    EQU    28H    ; Your Z80 SIO base port (data or status)
  129. MDCTL1    EQU    PORT+1    ; Modem control port
  130. MDDATP    EQU    PORT    ; Modem data port
  131. MDRCV    EQU    01H    ; Modem receive ready
  132. MDSND    EQU    04H    ; Modem send ready bit
  133. MDTXE    EQU    01H    ; Modem send buffer empty, holding buffer empty
  134. ;
  135. BRPORT    EQU    32H    ; CTC port for baud rate
  136.      ENDIF        ; A8000
  137. ;
  138. ;
  139.      IF    SER5
  140. PORT    EQU    1EH    ; Your base port (data or status)
  141. MDCTL1    EQU    PORT+1    ; Modem control port
  142. MDDATP    EQU    PORT    ; Modem data port
  143. MDRCV    EQU    01H    ; Modem receive ready
  144. MDSND    EQU    04H    ; Modem send ready bit
  145. MDTXE    EQU    01H    ; Modem send buffer empty, holding buffer empty
  146. ;
  147. BRPORT    EQU    0EH    ; CTC port for baud rate
  148.      ENDIF        ; SER5
  149. ;
  150. ;
  151. ; Jump table for the overlay: do NOT change this
  152. ;
  153. CODEBGN    EQU    $
  154. ;
  155. JUMPTAB:JP    SCRNPR        ; Screen print
  156.     JP    MRD        ; Modem read with timeout
  157.     JP    MCHIN        ; Get a character from modem
  158.     JP    MCHOUT        ; Send a character to the modem
  159.     JP    MORDY        ; Test for tx buffer empty
  160.     JP    MIRDY        ; Test for character received
  161.     JP    SNDBRK        ; Send break
  162.     JP    CURSADD        ; Cursor addressing
  163.     JP    CLS        ; Clear screen
  164.     JP    INVON        ; Inverse video on
  165.     JP    INVOFF        ; Inverse video off
  166.     JP    HIDE        ; Hide cursor
  167.     JP    SHOW        ; Show cursor
  168.     JP    SAVECU        ; Save cursor position
  169.     JP    RESCU        ; Restore cursor position
  170.     JP    MINT        ; Service modem interrupt
  171.     JP    INVEC        ; Initialise interrupt vectors
  172.     JP    DINVEC        ; De-initialise interrupt vectors
  173.     JP    MDMERR        ; Test uart flags for error
  174.     JP    DTRON        ; Turn DTR on
  175.     JP    DTROFF        ; Turn DTR OFF
  176.     JP    INIT        ; Initialise uart
  177.     JP    WAIT        ; Wait seconds
  178.     JP    MSWAIT        ; Wait milliseconds
  179.     JP    USERIN        ; User-defined entry routine
  180.     JP    USEROUT        ; User-defined exit routine
  181.         JP      GETVARS         ; get system variables
  182.         JP      SPARE           ; Spare for later use
  183.         JP      SPARE           ; Spare for later use
  184.     JP    SPARE        ; Spare for later use
  185.     JP    SPARE        ; Spare for later use
  186.     JP    SPARE        ; Spare for later use
  187.     JP    SPARE        ; Spare for later use
  188. ;
  189. ; Screen print function
  190. ;
  191. SCRNPR:
  192. ;
  193.     CALL    PRINT
  194.     DB    'This function not supported.',CR,LF,0
  195. ;
  196. SPARE:    RET
  197. ;
  198. ; User-defined entry routine
  199. ;
  200. USERIN:    RET
  201. ;
  202. ; User-defined exit routine
  203. ;
  204. USEROUT:RET
  205. ;
  206. ; Get a character from the modem: return in HL
  207. ; It is not necessary to test for status
  208. ;
  209. MCHIN:    PUSH    BC
  210.     IN    A,(MDDATP)    ; Get the character in A
  211.     LD    L,A        ; Put in HL
  212.     LD    H,0
  213.     OR    A        ; Set/clear Z
  214.     POP    BC
  215.     RET
  216. ;
  217. ;Send a character to the modem
  218. ;
  219. MCHOUT:    LD    HL,2        ; Get the character
  220.     ADD    HL,SP
  221.     LD    A,(HL)        ; In A
  222. ;
  223.         PUSH    BC
  224.         LD      C,A
  225. MCHOUT1: IN     A,(MDCTL1)
  226.         AND     MDSND
  227.         JR      Z,MCHOUT1
  228.         LD      A,C
  229.         OUT     (MDDATP),A
  230.         POP     BC
  231.         RET                     ; Done
  232. ;
  233. ;Test for output ready: return TRUE (1) in HL if ok
  234. ;
  235. MORDY:
  236.     IN    A,(MDCTL1)
  237.     AND    MDTXE
  238.     JR    Z,MORDYX
  239.     LD    L,1
  240.     LD    H,0
  241. MORDYX:
  242.     LD    A,L        ; Set/clear Z
  243.     OR    A
  244.     RET
  245. ;
  246. ;Test for character at modem: return TRUE (1) in HL if so
  247. ;
  248. MIRDY:
  249.     IN    A,(MDCTL1)
  250.     AND    MDRCV
  251.     JR    Z,MIRDY1
  252.     LD    L,1
  253.     JR    MIRDYX
  254. MIRDY1:    LD    L,0
  255. ;
  256. MIRDYX:    LD    H,00H
  257.     LD    A,L        ; Set/clear Z
  258.     OR    A
  259.     RET
  260. ;
  261. ;Send a break to the modem: leave empty if your system can't do it
  262. ;
  263. SNDBRK:
  264.     LD    A,5
  265.     OUT    (MDCTL1),A    ; Send to the status port
  266.     LD    A,0F8H        ; DTR normal, send break tone
  267.     OUT    (MDCTL1),A
  268. ;
  269.         LD      HL,300
  270.     CALL    WAITHLMS    ; Wait 300 milliseconds
  271. ;
  272.     LD    A,5        ; Restore normal, 8 bits, DTR on, etc.
  273.     OUT    (MDCTL1),A
  274.         LD      A,0EAH
  275.     OUT    (MDCTL1),A
  276. ;
  277.     RET
  278. ;
  279. ; Test UART flags for error: return TRUE (1) in HL if error
  280. ;
  281. MDMERR:
  282.     LD    A,010H        ; Register 0, reset interrupts
  283.     OUT    (MDCTL1),A
  284.     IN    A,(MDCTL1)
  285. ;
  286.     LD    A,L        ; Set/clear Z
  287.     OR    A
  288.     RET
  289. ;
  290. ; Turn DTR (and optionally RTS) ON
  291. ;
  292. DTRON:
  293.     LD    A,05H
  294.     OUT    (MDCTL1),A
  295.         LD      A,0EAH
  296.     OUT    (MDCTL1),A
  297. ;
  298.     RET
  299. ;
  300. ; Turn DTR ( and RTS?) OFF
  301. ;
  302. DTROFF:
  303.     LD    A,05H
  304.     OUT    (MDCTL1),A
  305.     LD    A,078H
  306.     OUT    (MDCTL1),A
  307. ;
  308.     RET
  309. ;
  310. ;Initialise the UART
  311. ;
  312. INIT:    LD    HL,2        ; Get parameters
  313.     ADD    HL,SP
  314.     EX    DE,HL
  315.     CALL    GETPARM        ; In HL
  316.     LD    (BRATE),HL    ; Baud rate
  317.     CALL    GETPARM
  318.     LD    (PARITY),HL    ; Parity
  319.     CALL    GETPARM
  320.     LD    (DATA),HL    ; Data bits
  321.     CALL    GETPARM
  322.     LD    (STOP),HL    ; Stop bits
  323. ;
  324. ; <== Insert your own code here
  325. ;
  326.         PUSH    BC
  327.         LD      A,0             ; Select register
  328.     OUT    (MDCTL1),A
  329.     LD    A,018H        ; Throw out of mode
  330.     OUT    (MDCTL1),A
  331.     LD    A,04H        ; Select register
  332.     OUT    (MDCTL1),A
  333.         LD      A,044H          ; Set ASCII parameters (44=1, 4C=2 stop)
  334.         OUT     (MDCTL1),A
  335.         LD      A,03H           ; Select register
  336.     OUT    (MDCTL1),A
  337.     LD    A,0C1H        ; Enable receive
  338.     OUT    (MDCTL1),A
  339.     LD    A,05H        ; Select register
  340.     OUT    (MDCTL1),A
  341.         LD      A,0EAH          ; Enable send, 'DTR', RTS'- E8h = RTS OFF
  342.     OUT    (MDCTL1),A
  343. ;
  344.         LD      A,(BRATE)       ; Get the selected value
  345.     CP    1        ; 300 bps
  346.     JP    Z,OK300
  347.     CP    5        ; 1200 bps
  348.     JP    Z,OK1200
  349.     CP    6        ; 2400 bps
  350.     JP    Z,OK2400
  351.     CP    8        ; 9600 bps
  352.     JP    Z,OK9600
  353.         JR      SETBRX          ; Altos can't select over 9600 baud
  354. ;
  355. OK300:  LD      A,07H           ; set CTC mode
  356.         OUT     (BRPORT),A
  357.         LD      A,1             ; MSPEED 300 bps value
  358.         LD      B,BD300
  359.         JP      LOADBD
  360. ;
  361. OK1200: LD      A,47H           ; set CTC mode
  362.         OUT     (BRPORT),A
  363.         LD      A,5
  364.         LD      B,BD1200
  365.         JP      LOADBD
  366. ;
  367. OK2400: LD      A,47H           ; set CTC mode
  368.         OUT     (BRPORT),A
  369.         LD      A,6
  370.         LD      B,BD2400
  371.         JP      LOADBD
  372. ;
  373. OK9600: LD      A,47H
  374.         OUT     (BRPORT),A
  375.         LD      A,8
  376.         LD      B,BD9600
  377. ;
  378. LOADBD:
  379.         LD      (MSPEED),A      ; set baud in low memory
  380.         LD      A,B
  381.         OUT     (BRPORT),A
  382.         POP     BC
  383.         RET
  384. ;
  385. SETBRX: POP     BC
  386.         XOR      A              ; clear it
  387.         LD      (MSPEED),A      ; not a valid baud rate
  388.         RET
  389. ;
  390. ; Baudrate table
  391. ;
  392. BD300    EQU    52        ; 38400/300  converted to hex value
  393. BD1200    EQU    104        ; 124800/1200 converted to hex value
  394. BD2400    EQU    52        ; 124800/2400 converted to hex value
  395. BD9600    EQU    13        ; 124800/9600 converted to hex value
  396. ;
  397. ; <== End of your own code
  398. ;
  399.     RET
  400. ;
  401. BRATE:  DW      6               ; Baud rate:
  402.                 ; 0 = 110 baud    1 = 300 baud    2 = 450 baud
  403.                 ; 3 = 600 baud    4 = 710 baud    5 = 1200 baud
  404.                 ; 6 = 2400 baud 7 = 4800 baud    8 = 9600 baud
  405.                 ; 9 = 19200 baud
  406. PARITY: DW      'N'             ; Parity (will be 'N', 'E' or 'O')
  407. DATA:   DW      8               ; Data bits (will be 7 or 8)
  408. STOP:   DW      1               ; Stop bits (will be 1 or 2)
  409. ;
  410. ;-----------------------------------------------------------------------
  411. ;
  412. ; Video terminal sequences: these are for Adds-Viewpoint: Modify as you wish
  413. ;
  414. ; Cursor addressing
  415. ;
  416. CURSADD:LD    HL,2        ; Get parameters
  417.     ADD    HL,SP
  418.     EX    DE,HL
  419.     CALL    GETPARM        ; In HL
  420.     LD    (ROW),HL    ; Row
  421.     CALL    GETPARM
  422.     LD    (COL),HL    ; Column
  423. ;
  424. ; <== Insert your own code here, using values in row and column
  425. ;
  426.     CALL    PRINT
  427.         DB      ESC,'Y',0       ; ADDS-Viewpoint leadin
  428.     LD    A,(ROW)        ; Row first
  429.     ADD    A,' '        ; Add offset
  430.     CALL    COUT
  431.     LD    A,(COL)        ; Sane for column
  432.     ADD    A,' '
  433.     CALL    COUT
  434. ;
  435. ; <== end of your own code
  436. ;
  437.     RET
  438. ;
  439. ROW:    DS    2        ; Row
  440. COL:    DS    2        ; Column
  441. ;
  442. ;Clear screen
  443. ;
  444. CLS:    CALL    PRINT
  445.         DB      0CH,0
  446.     RET
  447. ;
  448. ; Inverse video on
  449. ;
  450. INVON:    CALL    PRINT
  451.         DB      0EH,0
  452.     RET
  453. ;
  454. ; Inverse video off
  455. ;
  456. INVOFF:    CALL    PRINT
  457.         DB      0FH,0
  458.     RET
  459. ;
  460. ; Turn off cursor
  461. ;
  462. HIDE:
  463.     RET
  464. ;
  465. ; Turn on cursor
  466. ;
  467. SHOW:
  468.     RET
  469. ;
  470. ; Save cursor position
  471. ;
  472. SAVECU:    RET
  473. ;
  474. ; Restore cursor position
  475. ;
  476. RESCU:    RET
  477. ;
  478. ;-----------------------------------------------------------------------
  479. ;
  480. ; Service modem interrupt
  481. ;
  482. MINT:    RET            ; My system doesn't need this
  483. ;
  484. ; Initialise interrupt vectors
  485. ;
  486. INVEC:    RET            ; Ditto
  487. ;
  488. ; De-initialise interrupt vectors
  489. ;
  490. DINVEC:    RET            ; Ditto
  491. ;
  492. ;------------------- End of user-defined code --------------------------
  493. ;         Do not change anything below here
  494. ;
  495. ; Modem character test for 100 ms
  496. ;
  497. MRD:    PUSH    BC        ; Save BC
  498.     LD    BC,100        ; Set limit
  499. ;
  500. MRD1:    CALL    MIRDY        ; Char at modem?
  501.     JR    NZ,MRD2        ; Yes, exit
  502.     LD    HL,1        ; Else wait 1 ms
  503.     CALL    WAITHLMS
  504.     DEC    BC        ; Loop till done
  505.     LD    A,B
  506.     OR    C
  507.     JR    NZ,MRD1
  508.     LD    HL,0        ; None there, result=0
  509.     XOR    A
  510. ;
  511. MRD2:    POP    BC
  512.     RET
  513. ;
  514. ; Inline print routine: destroys A and HL
  515. ;
  516. PRINT:    EX    (SP),HL        ; Get address of string
  517. ;
  518. PLOOP:    LD    A,(HL)        ; Get next
  519.     INC    HL        ; Bump pointer
  520.     OR    A        ; Done if zero
  521.     JR    Z,PDONE
  522.     CALL    COUT        ; Else print
  523.     JR    PLOOP        ; And loop
  524. ;
  525. PDONE:    EX    (SP),HL        ; Restore return address
  526.     RET            ; And quit
  527. ;
  528. ; Output a character in A to the console
  529. ;
  530. COUT:    PUSH    BC        ; Save registers
  531.     PUSH    DE
  532.     PUSH    HL
  533.     LD    E,A        ; Character to E
  534.     LD    C,2
  535.     CALL    BDOS        ; Print it
  536.     POP    HL
  537.     POP    DE
  538.     POP    BC
  539.     RET
  540. ;
  541. ; Wait(seconds)
  542. ;
  543. WAIT:    LD    HL,2
  544.     ADD    HL,SP
  545.     EX    DE,HL        ; Get delay size
  546.     CALL    GETPARM
  547. ;                ; Fall thru to...
  548. ; Wait seconds in HL
  549. ;
  550. WAITHLS:PUSH    BC        ; Save BC
  551.     PUSH    DE        ; DE
  552.     PUSH    IX        ; And IX
  553.     LD    IX,0        ; Then point IX to 0
  554. ;                ;   so we don't upset memory-mapped I/O
  555. ;
  556. ; Calculate values for loop constants. Need to have two loops to avoid
  557. ; 16-bit overflow with clock speeds above 9 MHz.
  558. ;
  559. OUTERVAL EQU    (CLKSPD    / 10) +    1
  560. ;
  561. INNERVAL EQU    (6667 /    OUTERVAL) * CLKSPD
  562. ;
  563. WAIT10:    LD    B,OUTERVAL
  564. ;
  565. WAIT11:    LD    DE,INNERVAL
  566. ;
  567. WAIT12:    BIT    0,(IX)        ; Time-wasters
  568.     BIT    0,(IX)
  569.     BIT    0,(IX)        ; 20 T-states each
  570.     BIT    0,(IX)
  571.     BIT    0,(IX)
  572.     BIT    0,(IX)
  573.     DEC    DE
  574.     LD    A,E
  575.     LD    A,D
  576.     OR    E
  577.     JR    NZ,WAIT12    ; 150 T-states per inner loop
  578.     DJNZ    WAIT11        ; Decrement outer loop
  579.     DEC    HL        ; Ok, decrement count in HL
  580.     LD    A,H
  581.     OR    L
  582.     JR    NZ,WAIT10
  583.     POP    IX        ; Done -- restore IX
  584.     POP    DE        ; DE
  585.     POP    BC        ; And BC
  586.     RET
  587. ;
  588. ; Wait milliseconds
  589. ;
  590. MSWAIT:    LD    HL,2
  591.     ADD    HL,SP
  592.     EX    DE,HL        ; Get delay size
  593.     CALL    GETPARM
  594. ;
  595. ; Wait milliseconds in HL
  596. ;
  597. WAITHLMS:
  598.     PUSH    DE
  599. ;
  600. W1MS0:    LD    DE,39 *    CLKSPD
  601. ;
  602. W1MS1:    DEC    DE
  603.     LD    A,D
  604.     OR    E
  605.     JR    NZ,W1MS1
  606.     DEC    HL
  607.     LD    A,H
  608.     OR    L
  609.     JR    NZ,W1MS0
  610.     POP    DE
  611.     RET
  612. ;
  613. ; Get next parameter from (DE) into HL
  614. ;
  615. GETPARM:EX    DE,HL        ; Get address into HL
  616.     LD    E,(HL)        ; Get low
  617.     INC    HL
  618.     LD    D,(HL)        ; Then hihi
  619.     INC    HL        ; Bump for next
  620.     EX    DE,HL        ; Result in HL, address still in DE
  621.     RET
  622. ;
  623. ;Get address of user-defined variables
  624.  
  625. getvars:
  626.        ld      hl,uservars
  627.        ret
  628.  
  629. uservars:
  630.        dw      overdrive       ; .OVR etc. drive/user
  631.        dw      overuser
  632.  
  633.  
  634.          IF     ($ - CODEBGN) GT OVSIZE
  635. TOOBIG:    JP    ERRVAL        ; Overlay is too large
  636.      ENDIF
  637. ;
  638.     END
  639.  
  640. ;--------------------------------------------------------------
  641. ;
  642. ;
  643. ; The bios jump table starts at 5700h in the cbios64.com file loaded at boot.
  644. ; Listed are the addresses used when patching this file.
  645. ; this code winds up at F6B0 after boot up.
  646. ; original code here, if yours doesnt look like this, then don't try this.
  647. ;
  648. ;57B0   LD      SP,(F757)
  649. ;57B4   LD      B,A
  650. ;57B5   LD      A,(F759)
  651. ;
  652. ; change next instruction
  653. ;
  654. ;57B8   OUT    9,A        change to   JP  0F644
  655. ;57BA   LD     B,A
  656. ;57BB   RET
  657. ;
  658. ;57BC   POP     HL
  659. ;57BD   LD      (F757),SP
  660. ;57C1   IN      A,9
  661. ;57C3   LD      (F759),A
  662. ;57C6   LD      A,18
  663. ;57C8   OUT     9,A
  664. ;
  665. ; change next instruction
  666. ;
  667. ;57CA   LD      SP,C000    change to  JP  0F650
  668. ;57CD   JP      (HL)
  669. ;
  670. ;57CE   LD  A,18
  671. ;57D0   OUT 9,A
  672. ;
  673. ;
  674. ;  add at 5744h , this area should be empty originally
  675. ;
  676. ;5744    LD      IX,(0F670)
  677. ;5748    LD      IY,(0F672)
  678. ;574C    OUT     9,A
  679. ;574E    LD      A,B
  680. ;574F    RET
  681. ;5750    LD      (0F670),IX
  682. ;5754    LD      (0F672),IY
  683. ;5758    LD      SP,0C000
  684. ;575B    JP      (HL)
  685. ;
  686. ; save changes as CBIOS64.new and make sure files are the same length
  687. ; then rename cbios64.old=cbios64.com and cbios64.com=cbios64.new and reboot
  688. ; and try it out.
  689. ;
  690. ; I take no responsiblity for whatever results from attempting this.
  691. ; make sure you have backups always.
  692. ; if your bios looks like this, then this will allow you to run
  693. ; ZMP, RZMP, QL40, and other programs that may not have worked before.
  694.  
  695.