home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / pg / pgxos / xrambo.src < prev    next >
Text File  |  2006-10-19  |  2KB  |  97 lines

  1. ;***************************
  2. ;*          XRAMBO         *
  3. ;*    Copyright (c) 1989   *
  4. ;*      by Paul Globman    *
  5. ;***************************
  6. ;
  7. ;For use with RAMBO (by EME Systems).
  8. ;
  9. ;Save, Load, or Exchange complete
  10. ;RAM environments with the following
  11. ;commands.
  12. ;
  13. ;S=SAVE  L=LOAD  X=EXCHANGE
  14. ;
  15. ;RAMBO must be initialized with the 
  16. ;SAVE command before the LOAD or 
  17. ;EXCHANGE command can be used.  FAILURE
  18. ;to initialize RAMBO with the SAVE
  19. ;command can result in a loss of files.
  20. ;
  21. ;This source file is setup for the 
  22. ;Tandy 200 with XOS.  Change 6 EQU's
  23. ;and modify/delete 3 statements in
  24. ;source code for M100 use.
  25. ;
  26. ;           T200         M100
  27. ;
  28. ALTBUF: EQU 63572    ;64704
  29. BNKPRT:    EQU D8H        ;E8H
  30. GETINP:    EQU 12F7H    ;12CBH
  31. MAKUPR:    EQU 1014H    ;0FE9H
  32. PRINT:    EQU 11CCH    ;11A2H
  33. RAMST:    EQU A300H    ;8000H
  34. ;RAMST:    EQU A000H for T200 without XOS
  35. ;
  36.     org altbuf
  37.     entry
  38. ;
  39.     lxi h,msg    ;offer option
  40.     call print    ;print it
  41.     call getinp    ;get response
  42.     call makupr    ;make upper
  43.     rst 4        ;echo response
  44.     cpi 'S'
  45.     jz saver    ;this is save
  46.     cpi 'L'
  47.     jz loadr    ;this is load
  48.     cpi 'X'
  49.     rnz
  50. ;
  51. swapr:    call swbnk  ;switch to RAMBO
  52. swap:    mov b,m        ;ram in b
  53.     ldax d        ;rambo in a
  54.     xchg
  55.     mov m,b
  56.     stax d
  57.     xchg
  58.     call next
  59.     jmp swap
  60. ;
  61. loadr:    call swbnk  ;switch to RAMBO
  62. load:    ldax d
  63.     mov m,a
  64.     call next
  65.     jmp load
  66. ;
  67. saver:    call swbnk  ;switch to RAMBO
  68. save:    mov a,m
  69.     stax d
  70.     call next
  71.     jmp save
  72. ;
  73. next:    inx h
  74.     inx d
  75.     mov a,h
  76.     ora l
  77.     rnz
  78. ;
  79. exit:    XRA A
  80.     out bnkprt
  81.     rst 0
  82. ;
  83. swbnk:    di        ;switch to
  84.     pop b        ;RAMBO
  85.     lxi sp,ffffh
  86.     push b
  87.     in bnkprt   ;not used for M100
  88.     ani 0ch     ;not used for M100
  89.     ori 2       ;MVI A,1  for M100
  90.     out bnkprt
  91.     lxi h,ramst
  92.     lxi d,0000h
  93.     ret
  94. ;
  95. msg:    db 'S/L/X:',27,75,0
  96.     end
  97.