1 2 MODULE generic_console_ioctl 3 PUBLIC generic_console_ioctl 4 5 defc CHAR_TABLE = 0x3000 6 7 SECTION code_clib 8 INCLUDE "ioctl.def" 9 10 PUBLIC CLIB_GENCON_CAPS 11 defc CLIB_GENCON_CAPS = CAP_GENCON_CUSTOM_FONT | CAP_GENCON_UDGS |CAP_GENCON_FG_COLOUR 12 13 14; a = ioctl 15; de = arg 16generic_console_ioctl: 17 ex de,hl 18 ld c,(hl) ;hl = source 19 inc hl 20 ld h,(hl) 21 ld l,c 22 cp IOCTL_GENCON_SET_FONT32 23 jr nz,check_set_udg 24 ld de,CHAR_TABLE + 256 25 ld bc,768 26 ldir 27success: 28 and a 29 ret 30check_set_udg: 31 cp IOCTL_GENCON_SET_UDGS 32 jr nz,failure 33 ld de,CHAR_TABLE + 1024 34 ld bc,128 * 8 35 ldir 36 jr success 37failure: 38 scf 39 ret 40