home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / p / rddt.lbr / RELOCATE.AZM / RELOCATE.ASM
Encoding:
Assembly Source File  |  1993-10-25  |  3.4 KB  |  156 lines

  1. ;==RDDTMOD.ASM===H WEINSTEIN=== 8303200530 =================
  2. ;
  3. ; DDT is a trademark of Digital Research,Inc.  DDT.COM is a
  4. ; copyright program of Digital Research, Inc.  Do not distri-
  5. ; bute modified copies of DDT.COM.  Do not exceed the
  6. ; ridiculous limitations of your license agreement with
  7. ; Digital Research, Inc. 
  8. ;
  9. ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  10. ;\\ Copyright 1983 H Weinstein, San Diego CA 92128.   \\
  11. ;\\    All rights reserved.  May be copied for     \\
  12. ;\\    personal, non-commercial use only.          \\
  13. ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  14. ;
  15. ; The following is for personal experimentation purposes only.
  16. ;
  17. ; This is a modification of DDT.COM version 2.2 which
  18. ; permits the operator to determine where DDT will run
  19. ; between the limits of 1500h and (BDOS and 00FFh)-1000h.
  20. ;
  21. ; This helps to keep DDT out of the way of something you
  22. ; might want to look at (e.g., CCP) which would not be
  23. ; possible under standard DDT.
  24. ;
  25. ; -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  26. ;
  27. ; RECIPE:
  28. ;
  29. ;    1. Change the name of this file to RDDTMOD.ASM
  30. ;    2. Assemble it to obtain a file named RDDTMOD.HEX
  31. ;    3. Place the disk with this hex file in drive A:
  32. ;    4. If DDT is on the same disk, go to step 5 else
  33. ;       mount the disk with DDT in drive B:
  34. ;    5. Invoke DDT
  35. ;    6. Enter the following series of commands after
  36. ;       receiving the DDT prompt. For the purpose of
  37. ;       this recipe, DDT's messages are in square
  38. ;       brackets.  You enter the commands which are NOT
  39. ;       so enclosed, following each with a RETURN or
  40. ;       ENTER keystroke.  Here is the series:
  41. ;
  42. ;        [-] F100,2000,0
  43. ;        [-] IDDT.COM
  44. ;
  45. ; NOTE WELL: If your DDT disk is in drive B: then enter the
  46. ;            following, else skip to the line following 
  47. ;         NOTE 2.
  48. ;
  49. ;        [-] S5C
  50. ;        [005C 00] 2
  51. ;        [005D 44] .
  52. ;
  53. ; NOTE 2: See above
  54. ;        [-] R
  55. ;        [NEXT  PC]
  56. ;        [1500 0000]
  57. ;        [-] G0
  58. ;
  59. ;        A>SAVE 20 RDDT.COM
  60. ;
  61. ; When the system prompt appears on the screen, RDDT is 
  62. ;    available for your experimental use.  It is self-
  63. ;    prompting. All you will need to remember is that
  64. ;    when you respond with, say, page A6, the TPA from
  65. ;    0A600h through 0B5FFh will be in use by the program.
  66. ;
  67. ; -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  68. ;
  69.     org 12Dh
  70.     db 13,10,'R'
  71.     org 143h
  72.     db 2Dh
  73. ;
  74.     org 14Bh
  75.     jmp 1400h
  76. ;
  77.     org 1400h
  78.     push b
  79.     lda 7
  80.     sui 10h
  81.     push psw
  82.     mov h,a
  83.     rrc ! rrc ! rrc ! rrc
  84.     call bcd2asc
  85.     sta max
  86.     mov a,h
  87.     call bcd2asc
  88.     sta max+1
  89.     call max$msg
  90.     db 13,10,10
  91.     db 'Enter HEX page number:',13,10,9
  92.     db 'NOT less than 15h nor more than '
  93. max    db 'XXh.',13,10,10
  94.     db '<CR> gives maximum default.  SELECTION:  $'
  95. bcd2asc    ani 0Fh
  96.     adi 90h
  97.     daa
  98.     aci 40h
  99.     daa
  100.     ret
  101. accept    mov b,a
  102.     cpi 0Ah
  103.     mvi a,0
  104.     rc
  105.     mov a,b
  106.     cpi 11h
  107.     mvi a,0FFh
  108.     rc
  109.     mov a,b
  110.     sui 7
  111.     mov b,a
  112.     cpi 10h
  113.     mvi a,0
  114.     rc
  115.     mvi a,0FFh
  116.     ret
  117. max$msg    mvi c,9
  118.     pop d
  119.     call 5
  120.     mvi c,1
  121.     call 5
  122.     cpi 13
  123.     jz default
  124.     sui 30h
  125.     call accept
  126.     ora a
  127.     jnz 100h
  128.     mov a,b
  129.     sta max
  130.     mvi c,1
  131.     call 5
  132.     sui 30h
  133.     call accept
  134.     ora a
  135.     jnz 100h
  136.     mov a,b
  137.     sta max+1
  138.     lda max
  139.     add a ! add a ! add a ! add a
  140.     lxi h,max+1
  141.     add m
  142.     mov b,a
  143.     cpi 15h
  144.     jc 100h
  145.     pop psw
  146.     cmp b
  147.     jc 100h
  148.     mov a,b
  149.     pop b
  150.     jmp 151h
  151. ;
  152. default pop psw
  153.     pop b
  154.     jmp 151h
  155.     end
  156.