Blame | Last modification | View Log | Download
'open file. load 16cld a,(filehandle)ld b,aOS_GETFILESIZE ;dehl=filesize;ld de,dirname;OS_CHDIRld de,gfxnamecall openstream_file;or a;jp nz,noloadgfx;;;;;;;;;;;;dirname;;;;;;;;;;;; db "eric",0;;;;;;;;;;;gfxname;;;;;;;;;;;; db "eric/ericgfx.bmp",0;;;;;;;;;;;;;;;;;;;;;;; ld de,bmpbuf;;;;;;;;;;;;;;;;;;;;;;; ld hl,14+2;;;;;;;;;;;;;;;;;;;;;;; call readstream_file;;;;;;;;;;;;;;;;;;;;;;; ;DE = Buffer address, HL = Number of bytes to readcall setEGA ;keeps hlld hl,0x8000ld de,0x8000call readstream_fileld de,TPAL;curpalld hl,32call readstream_filecall closestream_fileld de,TPAL;curpalOS_SETPALjp waitkeyquitpalstandardSTANDARDPALpalblackds 32,0xf3''''''''''''''''''''''''''''''''''setEGA;keeps hlpush hlld de,palblackOS_SETPALld e,0OS_SETGFX ;e=0:EGA, e=2:MC, e=3:6912, e=6:text ;+SET FOCUS ;e=-1: disable gfx (out: e=old gfxmode)ld hl,0x8000ld bc,0x7fffcall fillzeropop hlretfillzerold d,hld e,linc deld (hl),0ldirret