;GENERAL LOADER FOR HACKED GAMES
;This loads a series of files called A.BIN, B.BIN, C.BIN etc. to any address
;provided it isn't over the firmware or disc workspace. Files are loaded
;in alphabetical order.

ld hl,ent
ld c,&ff
jp &bd16
.ent
ld hl,&b0ff
ld de,&40
ld c,7
call &bcce


;****************************************************************************

;Put the actual load instructions in here, along with anything else to
;actually execute the game (LDIR's, JP game_exec etc.)

;****************************************************************************

.name   text "A.BIN"

.load
;Enter with DE holding the address of where the file is to go

push de
ld hl,name
ld b,5
call &bc77
pop hl
call &bc83
call &bc7a
ld hl,name
inc (hl)
ret

