;---------------------------------------
;API (Advanced Programming Interface)
;for IRQNI by KM/Taboo
;
;version 1.0b
;
;created by Morris/Elysium, 24.07.1999
;
;complete kit includes:
;1. this API description
;2. API header file
;3. binary file containing the code
;
;for use by Elysium members only
;(as for now)

;------------------------------------API
;apiPREPARE
;---------------------------------------
;this function transfers the loader code
;into the diskdrive memory and runs it.
;call this function only once. you may
;call apiPREPARE again after killing
;the code in the diskdrive (of course
;if you do not overwrite this function
;with your custom data)

;***************************************
;apiLOAD
;---------------------------------------
;.X 1st byte of filename or track number
;.Y 2nd byte of name or sector number
;.A command:
;   bit7=0: searching by name
;   bit7=1: starting from track/sector
;
;   bit6=0: load to original address
;   bit6=1: load to other address
;
;if bit6=1 then:
;   offset 0: <load
;   offset 1: >load
;
;examples:
;load file "a1" to original address:
;
;  ldx #"a"
;  ldy #"1"
;  lda #0
;  jsr apiload
;
;load file from track 12 sector 1
;to $4480
;
;  ldx #12
;  ldy #1
;  lda #$c0
;  jsr apiload
;  .byte $80,$44

;***************************************
;apiDEPACK           (depack mem to mem)
;---------------------------------------
;.X <destination
;.Y >destination
;.A speed
;offset
;0: <source
;1: >source
;
;example:
;source=$8000
;destination=$4000
;speed=6
;
;   ldx #$00
;   ldy #$40
;   lda #6
;   jsr depack
;   .byte $00,$80

;***************************************
;apiLDEPACK      (load with decrunching)
;---------------------------------------
;.X 1st byte of filename or track number
;.Y 2nd byte of name or sector number
;.A command:
;   bit7=0: searching by name
;   bit7=1: starting from track/sector
;
;   bit6=0: depack to original address
;   bit6=1: depack to other address
;
;   bits2-0: speed
;
;if bit6=1 then:
;   offset 0: <destination
;   offset 1: >destination
;
;examples:
;decrunch file "xl" to original address
;(speed 6):
;
;  ldx #"x"
;  ldy #"l"
;  lda #6
;  jsr apildepack
;
;decrunch file "xl" to $4480 (speed 3):
;
;  ldx #"x"
;  ldy #"l"
;  lda #$43 ; = #$40 + 3
;  jsr apildepack
;  .byte $80,$44

;***************************************
;apiLOAD_DEP    (load and then decrunch)
;---------------------------------------
;.X: 1st byte of filename or track number
;.Y: 2nd byte of name or sector number
;.A command:
;   bit7=0: searching by name
;   bit7=1: starting from track/sector
;
;   bit6=0: depack to original address
;   bit6=1: depack to other address
;
;   bits2-0: speed
;
;if bit6=1 then:
;   offset 0: <load
;   offset 1: >load
;   offset 2: <depack
;   offset 3: >depack
;
;if bit6=0 then:
;   offset 0: <load
;   offset 1: >load
;
;examples:
;load file "xl" to $2000 and then
;depack it to $4500 with speed 4:
;
;   ldx #"x"
;   ldy #"l"
;   lda #$44
;   jsr apiload_dep
;   .byte $00,$20,$00,$45
;
;load file from track 12 sector 16
;to $3333 and then depack it to
;original address with speed 5:
;
;   ldx #12
;   ldy #16
;   lda #$85
;   jsr apiload_dep
;   .byte $33,$33

;***************************************
;apiKILLDRV
;---------------------------------------
;kills the loader code in the diskdrive
;-----------------------------end of API
