home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / apple / apboot.mqc / APBOOT.MAC
Encoding:
Text File  |  1985-02-10  |  1.3 KB  |  38 lines

  1. ;*****  This program allows you to boot from Apple CP/M to any other
  2. ;*****  slot, with the default slot being 6.  You just type:
  3. ;*****  BOOT x, where x is the slot you wish to boot to.  If x
  4. ;*****  is omitted, the default value of 6 will apply.  The program
  5. ;*****  will pause for a keypress before performing the actual boot.
  6.  
  7. ;*****  Written by Bill Blue, April 1981
  8.  
  9.  
  10.     aseg            ;only for M80
  11.     .8080            ; likewise
  12.     org 100h
  13.  
  14. bdos    equ    5
  15. fcb    equ    5ch
  16. doit    equ    3000h
  17.  
  18. enter:    mvi    c,01        ;select input mode
  19.     call    bdos        ;wait for keypress
  20.     lxi    h,0c777h    ;set up RST 0
  21.     shld    doit        ;install in intermediate loc
  22.     lxi    h,fcb+1        ;check command line for alternative slot
  23.     mov    a,m        ;get the chracter pointed to by hl
  24.     lxi    h,0C600h    ;default boot address
  25.     cpi    ' '        ;anything there?
  26.     jz    piksix        ;no, assume slot six and skip next
  27.     cpi    '8'        ;slot spec'd in the right range?
  28.     jnc    piksix        ;nope, assume default
  29.     cpi    '1'        ;another check
  30.     jc    piksix        ;out of range
  31.     adi    90h        ;else create msb of boot byte
  32.     mov    h,a        ;move to h reg (l already established)
  33. piksix:    shld    0F3D0h        ;save boot address
  34.     lhld    0F3DEh        ;get Z80 card address
  35.     jmp    doit        ;and execute
  36.  
  37.     end
  38.