-
Notifications
You must be signed in to change notification settings - Fork 1
/
tniasm.tmp
1 lines (1 loc) · 202 KB
/
tniasm.tmp
1
System\Main.s1FNAME "msx-windows.rom" 3PageSize: equ 0x4000 56 org 0x40008ROM_Start:10 Include/RomHeader.s12 db "AB" 3 dw Execute 4 dw 0 6 dw 0 8 dw 0 9 dw 0, 0, 0 10 11System\Main.s11 Include/MsxBios.s189BIOS_HWVER: equ 0x002d1112BIOS_CGTABL: equ 0x0004 13BIOS_VDP_DR: equ 0x0006 14BIOS_VDP_DW: equ 0x0007 1617BIOS_CHKRAM: equ 0x000018BIOS_SYNCHR: equ 0x000819BIOS_RDSLT: equ 0x000c20BIOS_CHRGTR: equ 0x001021BIOS_WRSLT: equ 0x001422BIOS_OUTDO: equ 0x001823BIOS_CALSLT: equ 0x001c24BIOS_DCOMPR: equ 0x002025BIOS_ENASLT: equ 0x002426BIOS_GETYPR: equ 0x002827BIOS_CALLF: equ 0x003028BIOS_KEYINT: equ 0x00383031BIOS_INITIO: equ 0x003b32BIOS_INIFNK: equ 0x003e3435BIOS_DISSCR: equ 0x004136BIOS_ENASCR: equ 0x004437BIOS_WRTVDP: equ 0x004738BIOS_RDVRM: equ 0x004a39BIOS_WRTVRM: equ 0x004d40BIOS_SETRD: equ 0x005041BIOS_SETWRT: equ 0x005342BIOS_FILVRM: equ 0x005643BIOS_LDIRMV: equ 0x005944BIOS_LDIRVM: equ 0x005c45BIOS_CHGMOD: equ 0x005f46BIOS_CHGCLR: equ 0x006247BIOS_NMI: equ 0x006648BIOS_CLRSPR: equ 0x006949BIOS_INITXT: equ 0x006c50BIOS_INIT32: equ 0x006f51BIOS_INIGRP: equ 0x007252BIOS_INIMLT: equ 0x007553BIOS_SETTXT: equ 0x007854BIOS_SETT32: equ 0x007b55BIOS_SETGRP: equ 0x007e56BIOS_SETMLT: equ 0x008157BIOS_CALPAT: equ 0x008458BIOS_CALATR: equ 0x008759BIOS_GSPSIZ: equ 0x008a60BIOS_GRPPRT: equ 0x008d6263BIOS_GICINI: equ 0x009064BIOS_WRTPSG: equ 0x009365BIOS_RDPSG: equ 0x009666BIOS_STRTMS: equ 0x00996869BIOS_CHSNS: equ 0x009c70BIOS_CHGET: equ 0x009f71BIOS_CHPUT: equ 0x00a272BIOS_LPTOUT: equ 0x00a573BIOS_LPTSTT: equ 0x00a874BIOS_CNVCHR: equ 0x00ab75BIOS_PINLIN: equ 0x00ae76BIOS_INLIN: equ 0x00b177BIOS_QINLIN: equ 0x00b478BIOS_BREAKX: equ 0x00b779BIOS_BEEP: equ 0x00c080BIOS_CLS: equ 0x00c381BIOS_POSIT: equ 0x00c682BIOS_FNKSB: equ 0x00c983BIOS_ERAFNK: equ 0x00cc84BIOS_DSPFNK: equ 0x00cf85BIOS_TOTEXT: equ 0x00d28788BIOS_GTSTCK: equ 0x00d589BIOS_GTTRIG: equ 0x00d890BIOS_GTPAD: equ 0x00db91BIOS_GTPDL: equ 0x00de9394BIOS_TAPION: equ 0x00e195BIOS_TAPIN: equ 0x00e496BIOS_TAPIOF: equ 0x00e797BIOS_TAPOON: equ 0x00ea98BIOS_TAPOUT: equ 0x00ed99BIOS_TAPOOF: equ 0x00f0100BIOS_STMOTR: equ 0x00f3102103BIOS_CHGCAP: equ 0x0132104BIOS_CHGSND: equ 0x0135105BIOS_RSLREG: equ 0x0138106BIOS_WSLREG: equ 0x013b107BIOS_RDVDP: equ 0x013e108BIOS_SNSMAT: equ 0x0141109BIOS_PHYDIO: equ 0x0144110BIOS_ISFLIO: equ 0x014a111BIOS_OUTDLP: equ 0x014d112BIOS_KILBUF: equ 0x0156113BIOS_CALBAS: equ 0x0159115116BIOS_SUBROM: equ 0x015c117BIOS_EXTROM: equ 0x015f118BIOS_EOL: equ 0x0168119BIOS_BIGFIL: equ 0x016b120BIOS_NSETRD: equ 0x016e121BIOS_NSTWRT: equ 0x0171122BIOS_NRDVRM: equ 0x0174123BIOS_NWRVRM: equ 0x0177125126BIOS_GRPRT: equ 0x0089127BIOS_NVBXLN: equ 0x00c9128BIOS_NVBXFL: equ 0x00cd129BIOS_CLSSUB: equ 0x0115130BIOS_VDPSTA: equ 0x0131131BIOS_SETPAG: equ 0x013d132BIOS_INIPLT: equ 0x0141133BIOS_RSTPLT: equ 0x0145134BIOS_GETPLT: equ 0x0149135BIOS_SETPLT: equ 0x014d136BIOS_PROMPT: equ 0x0181137BIOS_NEWPAD: equ 0x01ad138BIOS_CHGMDP: equ 0x01b5139BIOS_KNJPRT: equ 0x01bd140BIOS_REDCLK: equ 0x01f5141BIOS_WRTCLK: equ 0x01f9143144BIOS_RDPRIM: equ 0xf380145BIOS_WRPRIM: equ 0xf385146BIOS_CLPRIM: equ 0xf38c148149BIOS_USRTAB: equ 0xf39a150BIOS_LINL40: equ 0xf3ae151BIOS_LINL32: equ 0xf3af152BIOS_LINLEN: equ 0xf3b0153BIOS_CRTCNT: equ 0xf3b1154BIOS_CLMLST: equ 0xf3b2156157BIOS_TXTNAM: equ 0xf3b3158BIOS_TXTCOL: equ 0xf3b5159BIOS_TXTCGP: equ 0xf3b7160BIOS_TXTATR: equ 0xf3b9161BIOS_TXTPAT: equ 0xf3bb163164BIOS_T32NAM: equ 0xf3bd165BIOS_T32COL: equ 0xf3bf166BIOS_T32CGP: equ 0xf3c1167BIOS_T32ATR: equ 0xf3c3168BIOS_T32PAT: equ 0xf3c5170171BIOS_GRPNAM: equ 0xf3c7172BIOS_GRPCOL: equ 0xf3c9173BIOS_GRPCGP: equ 0xf3cb174BIOS_GRPATR: equ 0xf3cd175BIOS_GRPPAT: equ 0xf3cf177178BIOS_MLTNAM: equ 0xf3d1179BIOS_MLTCOL: equ 0xf3d3180BIOS_MLTCGP: equ 0xf3d5181BIOS_MLTATR: equ 0xf3d7182BIOS_MLTPAT: equ 0xf3d9184185BIOS_CLIKSW: equ 0xf3db186BIOS_CSRY: equ 0xf3dc187BIOS_CSRX: equ 0xf3dd188BIOS_CNSDFG: equ 0xf3de190191BIOS_RG0SAV: equ 0xf3df192BIOS_RG1SAV: equ 0xf3e0193BIOS_RG2SAV: equ 0xf3e1194BIOS_RG3SAV: equ 0xf3e2195BIOS_RG4SAV: equ 0xf3e3196BIOS_RG5SAV: equ 0xf3e4197BIOS_RG6SAV: equ 0xf3e5198BIOS_RG7SAV: equ 0xf3e6199BIOS_RG8SAV: equ 0xffe7200BIOS_RG9SAV: equ 0xffe8201BIOS_STATFL: equ 0xf3e7202BIOS_TRGFLG: equ 0xf3e8203BIOS_FORCLR: equ 0xf3e9204BIOS_BAKCLR: equ 0xf3ea205BIOS_BDRCLR: equ 0xf3eb206BIOS_MAXUPD: equ 0xf3ec207BIOS_MINUPD: equ 0xf3ef208BIOS_ATRBYT: equ 0xf3f2210211BIOS_QUEUES: equ 0xf3f3212BIOS_FRCNEW: equ 0xf3f5214215BIOS_SCNCNT: equ 0xf3f6216BIOS_REPCNT: equ 0xf3f7217BIOS_PUTPNT: equ 0xf3f8218BIOS_GETPNT: equ 0xf3fa220221BIOS_CS120: equ 0xf3fc222BIOS_LOW: equ 0xf406223BIOS_HIGH: equ 0xf408224BIOS_HEADER: equ 0xf40a225BIOS_ASPCT1: equ 0xf40b226BIOS_ASPCT2: equ 0xf40d227BIOS_ENDPRG: equ 0xf40f229230BIOS_ERRFLG: equ 0xf414231BIOS_LPTPOS: equ 0xf415232BIOS_PRTFLG: equ 0xf416233BIOS_NTMSXP: equ 0xf417234BIOS_RAWPRT: equ 0xf418235BIOS_VLZADR: equ 0xf419236BIOS_VLZDAT: equ 0xf41b237BIOS_CURLIN: equ 0xf41c238BIOS_KBUF: equ 0xf41f239BIOS_BUFMIN: equ 0xf55d240BIOS_BUF: equ 0xf55e241BIOS_ENDBUF: equ 0xf660242BIOS_TTYPOS: equ 0xf661243BIOS_DIMFLG: equ 0xf662244BIOS_VALTYP: equ 0xf663245BIOS_DORES: equ 0xf664246BIOS_DONUM: equ 0xf665247BIOS_CONTXT: equ 0xf666248BIOS_CONSAV: equ 0xf668249BIOS_CONTYP: equ 0xf669250BIOS_CONLO: equ 0xf66a251BIOS_MEMSIZ: equ 0xf672252BIOS_STKTOP: equ 0xf674253BIOS_TXTTAB: equ 0xf676254BIOS_TEMPPT: equ 0xf768255BIOS_TEMPST: equ 0xf67a256BIOS_DSCTMP: equ 0xf698257BIOS_FRETOP: equ 0xf69b258BIOS_TEMP3: equ 0xf69d259BIOS_TEMP8: equ 0xf69f260BIOS_ENDFOR: equ 0xf6a1261BIOS_SUBFLG: equ 0xf6a5262BIOS_FLGINP: equ 0xf6a6263BIOS_TEMP: equ 0xf6a7264BIOS_PTRFLG: equ 0xf6a9265BIOS_AUTFLG: equ 0xf6aa266BIOS_AUTLIN: equ 0xf6ab267BIOS_AUTINC: equ 0xf6ad268BIOS_SAVTXT: equ 0xf6af269BIOS_ERRLIN: equ 0xf6b3270BIOS_DOT: equ 0xf6b5271BIOS_ERRTXT: equ 0xf6b7272BIOS_ONELIN: equ 0xf6b9273BIOS_ONEFLG: equ 0xf6bb274BIOS_TEMP2: equ 0xf6bc275BIOS_OLDLIN: equ 0xf6be276BIOS_OLDTXT: equ 0xf6c0277BIOS_VARTAB: equ 0xf6c2278BIOS_ARYTAB: equ 0xf6c4279BIOS_STREND: equ 0xf6c6280BIOS_DATPTR: equ 0xf6c8281BIOS_DEFTBL: equ 0xf6ca282BIOS_PRMSTK: equ 0xf6e4283BIOS_PRMLEN: equ 0xf6e6284BIOS_PARM1: equ 0xf6e8285BIOS_PRMPRV: equ 0xf74c286BIOS_PRMLN2: equ 0xf74e287BIOS_PARM2: equ 0xf750288BIOS_PRMFLG: equ 0xf7b4289BIOS_ARYTA2: equ 0xf7b5290BIOS_NOFUNS: equ 0xf7b7291BIOS_TEMP9: equ 0xf7b8292BIOS_FUNACT: equ 0xf7ba293BIOS_SWPTMP: equ 0xf7bc294BIOS_TRCFLG: equ 0xf7c4296297BIOS_FBUFFR: equ 0xf7c5298BIOS_DECTMP: equ 0xf7f0299BIOS_DECTM2: equ 0xf7f2300BIOS_DECCNT: equ 0xf7f4301BIOS_DAC: equ 0xf7f6302BIOS_HOLD8: equ 0xf806303BIOS_HOLD2: equ 0xf836304BIOS_HOLD: equ 0xf83e305BIOS_ARG: equ 0xf847306BIOS_RNDX: equ 0xf857308309BIOS_USRDATA: equ 0xf7f8311312BIOS_MAXFIL: equ 0xf85f313BIOS_FILTAB: equ 0xf860314BIOS_NULBUF: equ 0xf862315BIOS_PTRFIL: equ 0xf864316BIOS_RUNFLG: equ 0xf866317BIOS_FILNAM: equ 0xf866318BIOS_FILNM2: equ 0xf871319BIOS_NLONLY: equ 0xf87c320BIOS_SAVEND: equ 0xf87d321BIOS_FNKSTR: equ 0xf87f322BIOS_CGPNT: equ 0xf91f323BIOS_NAMBAS: equ 0xf922324BIOS_CGPBAS: equ 0xf924325BIOS_PATBAS: equ 0xf926326BIOS_ATRBAS: equ 0xf928327BIOS_CLOC: equ 0xf92a328BIOS_CMASK: equ 0xf92c329BIOS_MINDEL: equ 0xf92d330BIOS_MAXDEL: equ 0xf92f332333BIOS_ASPECT: equ 0xf931334BIOS_CENCNT: equ 0xf933335BIOS_CLINEF: equ 0xf935336BIOS_CNPNTS: equ 0xf936337BIOS_CPLOTF: equ 0xf938338BIOS_CPCNT: equ 0xf939339BIOS_CPNCNT8: equ 0xf93b340BIOS_CPCSUM: equ 0xf93d341BIOS_CSTCNT: equ 0xf93f342BIOS_CSCLXY: equ 0xf941343BIOS_CSAVEA: equ 0xf942344BIOS_CSAVEM: equ 0xf944345BIOS_CXOFF: equ 0xf945346BIOS_CYOFF: equ 0xf947348349BIOS_LOHMSK: equ 0xf949350BIOS_LOHDIR: equ 0xf94a351BIOS_LOHADR: equ 0xf94b352BIOS_LOHCNT: equ 0xf94d353BIOS_SKPCNT: equ 0xf94f354BIOS_MIVCNT: equ 0xf951355BIOS_PDIREC: equ 0xf953356BIOS_LFPROG: equ 0xf954357BIOS_RTPROG: equ 0xf955359360BIOS_MCLTAB: equ 0xf956361BIOS_MCLFLG: equ 0xf958362BIOS_QUETAB: equ 0xf959363BIOS_QUEBAK: equ 0xf971364BIOS_VOICAQ: equ 0xf975365BIOS_VOICBQ: equ 0xf9f5366BIOS_VOICCQ: equ 0xfa75368369BIOS_DPPAGE: equ 0xfaf5370BIOS_ACPAGE: equ 0xfaf6371BIOS_AVCSAV: equ 0xfaf7372BIOS_EXBRSA: equ 0xfaf8373BIOS_CHRCNT: equ 0xfaf9374BIOS_ROMA: equ 0xfafa375BIOS_MODE: equ 0xfafc376BIOS_NORUSE: equ 0xfafd377BIOS_XSAVE: equ 0xfafe378BIOS_YSAVE: equ 0xfb00379BIOS_LOGOPR: equ 0xfb02381382BIOS_RSTMP: equ 0xfb03383BIOS_TOCNT: equ 0xfb03384BIOS_RSFCB: equ 0xfb04385BIOS_RSIQLN: equ 0xfb06386BIOS_MEXBIH: equ 0xfb07387BIOS_OLDSTT: equ 0xfb0c388BIOS_OLDINT: equ 0xfb12389BIOS_DEVNUM: equ 0xfb17390BIOS_DATCNT: equ 0xfb18391BIOS_ERRORS: equ 0xfb1b392BIOS_FLAGS: equ 0xfb1c393BIOS_ESTBLS: equ 0xfb1d394BIOS_COMMSK: equ 0xfb1e395BIOS_LSTCOM: equ 0xfb1f396BIOS_LSTMOD: equ 0xfb20398399BIOS_PRSCNT: equ 0xfb35400BIOS_SAVSP: equ 0xfb36401BIOS_VOICEN: equ 0xfb38402BIOS_SAVVOL: equ 0xfb39403BIOS_MCLLEN: equ 0xfb3b404BIOS_MCLPTR: equ 0xfb3c405BIOS_QUEUEN: equ 0xfb3e406BIOS_MUSICF: equ 0xfc3f407BIOS_PLYCNT: equ 0xfb40409410BIOS_VCBA: equ 0xfb41411BIOS_VCBB: equ 0xfb66412BIOS_VCBC: equ 0xfb8b414415BIOS_ENSTOP: equ 0xfbb0416BIOS_BASROM: equ 0xfbb1417BIOS_LINTTB: equ 0xfbb2418BIOS_FSTPOS: equ 0xfbca419BIOS_CODSAV: equ 0xfbcc420BIOS_FNKSW1: equ 0xfbcd421BIOS_FNKFLG: equ 0xfbce422BIOS_ONGSBF: equ 0xfbd8423BIOS_CLIKFL: equ 0xfbd9424BIOS_OLDKEY: equ 0xfbda425BIOS_NEWKEY: equ 0xfbe5426BIOS_KEYBUF: equ 0xfbf0427BIOS_LINWRK: equ 0xfc18428BIOS_PATWRK: equ 0xfc40429BIOS_BOTTOM: equ 0xfc48430BIOS_HIMEM: equ 0xfc4a431BIOS_TRAPTBL: equ 0xfc4c432BIOS_RTYCNT: equ 0xfc9a433BIOS_INTFLG: equ 0xfc9b434BIOS_PADY: equ 0xfc9c435BIOS_PADX: equ 0xfc9d436BIOS_JIFFY: equ 0xfc9e437BIOS_INTVAL: equ 0xfca0438BIOS_INTCNT: equ 0xfca2439BIOS_LOWLIM: equ 0xfca4440BIOS_WINWID: equ 0xfca5441BIOS_GRPHED: equ 0xfca6442BIOS_ESCCNT: equ 0xfca7443BIOS_INSFLG: equ 0xfca8444BIOS_CSRSW: equ 0xfca9445BIOS_CSTYLE: equ 0xfcaa446BIOS_CAPST: equ 0xfcab447BIOS_KANAST: equ 0xfcac448BIOS_KANAMD: equ 0xfcad449BIOS_FLBMEM: equ 0xfcae450BIOS_SCRMOD: equ 0xfcaf451BIOS_OLDSCR: equ 0xfcb0452BIOS_CASPRV: equ 0xfcb1453BIOS_BRDATR: equ 0xfcb2454BIOS_GXPOS: equ 0xfcb3455BIOS_GYPOS: equ 0xfcb5456BIOS_GRPACX: equ 0xfcb7457BIOS_GRPACY: equ 0xfcb9458BIOS_DRWFLG: equ 0xfcbb459BIOS_DRWSCL: equ 0xfcbc460BIOS_DRWANG: equ 0xfcbd461BIOS_RUNBNF: equ 0xfcbe462BIOS_SAVENT: equ 0xfcbf463BIOS_ROMSLT: equ 0xfcc0464BIOS_EXPTBL: equ 0xfcc1465BIOS_SLTTBL: equ 0xfcc5466BIOS_SLTATR: equ 0xfcc9467BIOS_SLTWRK: equ 0xfd09468BIOS_PROCNM: equ 0xfd89469BIOS_DEVICE: equ 0xfd99471472BIOS_H_KEYI: equ 0xfd9a473BIOS_H_TIMI: equ 0xfd9f474BIOS_H_CHPH: equ 0xfda4475BIOS_H_DSPC: equ 0xfda9476BIOS_H_ERAC: equ 0xfdae477BIOS_H_DSPF: equ 0xfdb3478BIOS_H_ERAF: equ 0xfdb8479BIOS_H_TOTE: equ 0xfdbd480BIOS_H_CHGE: equ 0xfdc2481BIOS_H_INIP: equ 0xfdc7482BIOS_H_KEYC: equ 0xfdcc483BIOS_H_KYEA: equ 0xfdd1484BIOS_H_NMI: equ 0xfdd6485BIOS_H_PINL: equ 0xfddb486BIOS_H_QINL: equ 0xfde0487BIOS_H_INLI: equ 0xfde5488BIOS_H_ONGO: equ 0xfdea489BIOS_H_DSKO: equ 0xfdef490BIOS_H_SETS: equ 0xfdf4491BIOS_H_NAME: equ 0xfdf9492BIOS_H_KILL: equ 0xfdfe493BIOS_H_IPL: equ 0xfe03494BIOS_H_COPY: equ 0xfe08495BIOS_H_CMD: equ 0xfe0d496BIOS_H_DSKF: equ 0xfe12497BIOS_H_DSKI: equ 0xfe17498BIOS_H_ATTR: equ 0xfe1c499BIOS_H_LSET: equ 0xfe21500BIOS_H_RSET: equ 0xfe26501BIOS_H_FIEL: equ 0xfe2b502BIOS_H_MKI: equ 0xfe30503BIOS_H_MKS: equ 0xfe35504BIOS_H_MKD: equ 0xfe3a505BIOS_H_CVI: equ 0xfe3f506BIOS_H_CVS: equ 0xfe44507BIOS_H_CVD: equ 0xfe49508BIOS_H_GETP: equ 0xfe4e509BIOS_H_SETF: equ 0xfe53510BIOS_H_NOFO: equ 0xfe58511BIOS_H_NULO: equ 0xfe5d512BIOS_H_NTFL: equ 0xfe62513BIOS_H_MERG: equ 0xfe67514BIOS_H_SAVE: equ 0xfe6c515BIOS_H_BINS: equ 0xfe71516BIOS_H_BINL: equ 0xfe76517BIOS_H_FILE: equ 0xfd7b518BIOS_H_DGET: equ 0xfe80519BIOS_H_FILO: equ 0xfe85520BIOS_H_INDS: equ 0xfe8a521BIOS_H_RSLF: equ 0xfe8f522BIOS_H_SAVD: equ 0xfe94523BIOS_H_LOC: equ 0xfe99524BIOS_H_LOF: equ 0xfe9e525BIOS_H_EOF: equ 0xfea3526BIOS_H_FPOS: equ 0xfea8527BIOS_H_BAKU: equ 0xfead528BIOS_H_PARD: equ 0xfeb2529BIOS_H_NODE: equ 0xfeb7530BIOS_H_POSD: equ 0xfebc531BIOS_H_DEVN: equ 0xfec1532BIOS_H_GEND: equ 0xfec6533BIOS_H_RUNC: equ 0xfecb534BIOS_H_CLEAR: equ 0xfed0535BIOS_H_LOPD: equ 0xfed5536BIOS_H_STKE: equ 0xfeda537BIOS_H_ISFL: equ 0xfedf538BIOS_H_OUTD: equ 0xfee4539BIOS_H_CRDO: equ 0xfee9540BIOS_H_DSKC: equ 0xfeee541BIOS_H_DOGR: equ 0xfef3542BIOS_H_PRGE: equ 0xfef8543BIOS_H_ERRP: equ 0xfefd544BIOS_H_ERRF: equ 0xff02545BIOS_H_READ: equ 0xff07546BIOS_H_MAIN: equ 0xff0c547BIOS_H_DIRD: equ 0xff11548BIOS_H_FINI: equ 0xff16549BIOS_H_FINE: equ 0xff1b550BIOS_H_CRUN: equ 0xff20551BIOS_H_CRUS: equ 0xff25552BIOS_H_ISRE: equ 0xff2a553BIOS_H_NTFN: equ 0xff2f554BIOS_H_NOTR: equ 0xff34555BIOS_H_SNGF: equ 0xff39556BIOS_H_NEWS: equ 0xff3e557BIOS_H_GONE: equ 0xff43558BIOS_H_CHRG: equ 0xff48559BIOS_H_RETU: equ 0xff4d560BIOS_H_PRTF: equ 0xff52561BIOS_H_COMP: equ 0xff57562BIOS_H_FINP: equ 0xff5c563BIOS_H_TRMN: equ 0xff61564BIOS_H_FRME: equ 0xff66565BIOS_H_NTPL: equ 0xff6b566BIOS_H_EVAL: equ 0xff70567BIOS_H_OKNO: equ 0xff75568BIOS_H_FING: equ 0xff7a569BIOS_H_ISMI: equ 0xff7f570BIOS_H_WIDT: equ 0xff84571BIOS_H_LIST: equ 0xff89572BIOS_H_BUFL: equ 0xff8e573BIOS_H_FRQI: equ 0xff93574BIOS_H_SCNE: equ 0xff98575BIOS_H_FRET: equ 0xff9d576BIOS_H_PTRG: equ 0xffa2577BIOS_H_PHYD: equ 0xffa7578BIOS_H_FORM: equ 0xffac579BIOS_H_ERRO: equ 0xffb1580BIOS_H_LPTO: equ 0xffb6581BIOS_H_LPTS: equ 0xffbb582BIOS_H_SCRE: equ 0xffc0583BIOS_H_PLAY: equ 0xffc5585586BIOS_FCALL: equ 0xffca587BIOS_DISINT: equ 0xffcf588BIOS_ENAINT: equ 0xffd4592597598HKEYI: equ $fd9a 599HTIMI: equ $fd9f 601HOOK_SIZE: equ HTIMI - HKEYI604605MSXID1: equ $002b 609MSXID2: equ $002c 612MSXID3: equ $002d 617MSXID4: equ $002e 618MSXID5: equ $002f 619System\Main.s12 Include/MsxConstants.s1PORT_0: equ 0x982PORT_1: equ 0x993PORT_2: equ 0x9a4PORT_3: equ 0x9b78PPI.A: equ $a8 10PPI.B: equ $a9 11PPI.C: equ $aa 17PPI.R: equ $ab 2428REG0SAV: equ 0xF3DF29REG1SAV: equ 0xF3E030REG2SAV: equ 0xF3E131REG3SAV: equ 0xF3E232REG4SAV: equ 0xF3E333REG5SAV: equ 0xF3E434REG6SAV: equ 0xF3E535REG7SAV: equ 0xF3E637REG8SAV: equ 0xFFE738REG9SAV: equ 0xFFE839REG10SAV: equ 0xFFE940REG11SAV: equ 0xFFEA41REG12SAV: equ 0xFFEB42REG13SAV: equ 0xFFEC43REG14SAV: equ 0xFFED44REG15SAV: equ 0xFFEE45REG16SAV: equ 0xFFEF46REG17SAV: equ 0xFFF047REG18SAV: equ 0xFFF148REG19SAV: equ 0xFFF249REG20SAV: equ 0xFFF350REG21SAV: equ 0xFFF451REG22SAV: equ 0xFFF552REG23SAV: equ 0xFFF65456REG25SAV: equ 0xFFFA57REG26SAV: equ 0xFFFB58REG27SAV: equ 0xFFFC59System\Main.s13 Include/CommonRoutines.s1411ClearRam:12 ld hl, RamStart 13 ld de, RamEnd + 1 15.loop:16 xor a 17 ld (hl), a19 inc hl20 call BIOS_DCOMPR 21 ret z22 jp .loop2629ClearRamArea:30 xor a31.loop:32 ld (hl), a33 inc hl34 djnz .loop36 ret4044SetPaletteColor:45 push bc46 47 ld b, a 48 ld c, 16 49 call BIOS_WRTVDP50 ld c, PORT_2 51 pop de53 ld a, d 54 di55 out (c), a56 ld a, e 57 ei58 out (c), a60 ret6266SetPaletteColor_Without_DI_EI:67 push bc68 69 ld b, a 70 ld c, 16 71 call WRTVDP_without_DI_EI72 ld c, PORT_2 73 pop de75 ld a, d 77 out (c), a78 ld a, e 80 out (c), a82 ret8590SetPaletteColor_FromAddress:91 92 ld b, a 93 ld c, 16 94 call BIOS_WRTVDP95 ld c, PORT_2 97 ld a, (hl) 98 di99 out (c), a100 inc hl101 ld a, (hl) 102 ei103 out (c), a105 ret109110LoadPalette:111 112 ld b, 0 113 ld c, 16 114 call BIOS_WRTVDP115 ld c, PORT_2 117 ld b, 16118.loop:119 di120 ld a, (hl)121 out (c), a122 inc hl123 ld a, (hl)124 out (c), a125 ei126 inc hl127 djnz .loop128 129 ret133134EnableRomPage2:135137 call BIOS_RSLREG138 rrca139 rrca140 and 3 141 ld c,a142 ld b,0143 ld hl, BIOS_EXPTBL144 add hl,bc145 ld a,(hl)146 and 80h147 or c148 ld c,a149 inc hl150 inc hl151 inc hl152 inc hl153 ld a,(hl)154 and 0Ch155 or c156 ld h,080h157 call BIOS_ENASLT 159 ret162166Wait_B_Vblanks:167 168 push bc169 170 .loop:172 ld a, (BIOS_JIFFY)173 ld c, a174 .waitVBlank:175 ld a, (BIOS_JIFFY)176 cp c177 jp z, .waitVBlank179 djnz .loop180 181 pop bc183 ret185Wait_15_Vblanks:186 ld c, 15188 .loop:189 ld a, (BIOS_JIFFY)190 ld b, a191 .waitVBlank:192 ld a, (BIOS_JIFFY)193 cp b194 jp z, .waitVBlank196 dec c197 jp nz, .loop199 ret201Wait_Vblank:202.loop:203 ld a, (BIOS_JIFFY)204 ld b, a205.waitVBlank:206 ld a, (BIOS_JIFFY)207 cp b208 jp z, .waitVBlank210 ret212216SetVdp_Write:218 227 rlc h228 rla229 rlc h230 rla231 srl h232 srl h234 di235 236 out (PORT_1), a237 ld a, 14 + 128238 out (PORT_1), a240 241 ld a, l242 nop243 out (PORT_1), a244 ld a, h245 or 64246 ei247 out (PORT_1),a248 ret250254SetVdp_Read:255 rlc h256 rla257 rlc h258 rla259 srl h260 srl h261 di262 out (PORT_1), a263 ld a, 14 + 128264 out (PORT_1), a265 ld a, l266 nop267 out (PORT_1), a268 ld a, h269 ei270 out (PORT_1), a271 ret274282303 304306308310312317325333336ClearVram_MSX2:337 xor a 338 ld hl, 0 339 call SetVDP_Write341351 xor a353 357 358 ld d, 2 359.loop_2:360 ld c, 0 361.loop_1:362 ld b, 0 363.loop:364 out (PORT_0), a365 djnz .loop366 dec c367 jp nz, .loop_1368 dec d369 jp nz, .loop_2371 ret374Screen11:375 377 ld a, 8378 call BIOS_CHGMOD380 ld a, (REG25SAV)381 or 0001 1000 b382 ld (REG25SAV), a 383 ld b, a384 385 ld c, 25 386 call BIOS_WRTVDP387 ret389SetSprites16x16:390 ld a, (REG1SAV)391 or 0000 0010 b392 ld (REG1SAV), a393 ld b, a394 ld c, 1 395 call BIOS_WRTVDP396 ret398Set192Lines:399 403 ld a, (REG9SAV)404 and 0111 1111 b405 ld (REG9SAV), a406 ld b, a407 ld c, 9 408 call BIOS_WRTVDP409 ret411SetColor0ToNonTransparent:412 417 ld a, (REG8SAV)418 or 0010 0000 b419 ld b, 0010 1000 b 420 ld c, 0x08 421 call BIOS_WRTVDP422 ret424SetColor0ToTransparent:425 429 ld a, (REG8SAV)430 and 1101 1111 b431 ld (REG8SAV), a432 ld b, a433 ld c, 8 434 call BIOS_WRTVDP435 ret437DisableSprites:438 ld a, (REG8SAV)439 or 0000 0010 b440 ld b, a441 ld c, 8 442 call BIOS_WRTVDP443 ret445EnableSprites:446 ld a, (REG8SAV)447 and 1111 1101 b448 ld b, a449 ld c, 8 450 call BIOS_WRTVDP451 ret453457LDIRVM_MSX2:458 459 ex de, hl460 461 call SetVdp_Write462 ex de, hl463 ld d, c464 465 ld c, PORT_0 466 ld b, 0467.loop_1:468 otir469 dec d470 jp nz, .loop_1471 ret475481RandomNumber:482 push hl483 ld hl, (Seed)484 add hl, hl485 sbc a, a486 and 0x83487 xor l488 ld l, a489 ld (Seed), hl490 pop hl491 ret493 502 506512CheckCollision_16x16_16x16:514 ld a, d 515 sub b 516 jr c, .x1IsLarger 517 sub 16 518 ret nc 519 jp .checkVerticalCollision520.x1IsLarger:521 neg 526 527 sub 16 528 ret nc 530.checkVerticalCollision:531 ld a, e 532 sub c 533 jr c, .y1IsLarger 534 sub 16 535 ret 536.y1IsLarger:537 neg 542 543 sub 16 544 ret 548554CheckCollision_16x16_32x16:556 ld a, d 557 sub b 558 jr c, .x1IsLarger 559 sub 16 560 ret nc 561 jp .checkVerticalCollision562.x1IsLarger:563 neg 568 569 sub 32 570 ret nc 572.checkVerticalCollision:573 ld a, e 574 sub c 575 jr c, .y1IsLarger 576 sub 16 577 ret 578.y1IsLarger:579 neg 584 585 sub 16 586 ret 591597CheckCollision_8x8_16x16:599 ld a, d 600 sub b 601 jr c, .x1IsLarger 602 sub 8 603 ret nc 604 jp .checkVerticalCollision605.x1IsLarger:606 neg 611 612 sub 16 613 ret nc 615.checkVerticalCollision:616 ld a, e 617 sub c 618 jr c, .y1IsLarger 619 sub 8 620 ret 621.y1IsLarger:622 neg 627 628 sub 16 629 ret 635637643CheckCollision_Point_16x16:645 649 650 ld a, d651 cp b652 ret nc 654 ld a, b655 add 16 656 cp d657 ret nc 659 660 ld a, e661 cp c662 ret nc 664 667 ld a, e668 add 16669 ld e, a670 ld a, c671 cp e672 ret674 678 682 685 691696699709713716719724 725727734738740748 749757763770776779786792800802810817824827833835 837845850855859862873880885890893900905907913916918922926928931934937942 943946949 950955959962967 968971973 974979983987Execute_VDP_LMMM:988Execute_VDP_HMMM:989 ld a, 32 990 di991 out (PORT_1), a992 ld a, 17 + 128993 out (PORT_1), a994 ld c, 0x9B995.vdpReady:996 ld a, 2997 di998 out (PORT_1), a 999 ld a, 15 + 1281000 out (PORT_1), a1001 in a, (PORT_1)1002 rra1003 ld a, 0 1004 out (PORT_1), a1005 ld a, 15 + 1281006 ei1007 out (PORT_1), a 1008 jp c, .vdpReady1009 outi 1010 outi 1011 outi1012 outi1013 outi1014 outi1015 outi1016 outi1017 outi1018 outi1019 outi1020 outi1021 outi1022 outi1023 outi1024 ret10261030Execute_VDP_PSET:1031Execute_VDP_LINE:1032Execute_VDP_HMMV:1033 ld a, 36 1034 di1035 out (PORT_1), a1036 ld a, 17 + 1281037 out (PORT_1), a1038 ld c, 0x9B1039.vdpReady:1040 ld a, 21041 di1042 out (PORT_1), a 1043 ld a, 15 + 1281044 out (PORT_1), a1045 in a, (PORT_1)1046 rra1047 ld a, 0 1048 out (PORT_1), a1049 ld a, 15 + 1281050 ei1051 out (PORT_1), a 1052 jp c, .vdpReady1053 outi 1054 outi 1055 outi1056 outi1057 outi1058 outi1059 outi1060 outi1061 outi1062 outi1063 outi1064 ret10671070Execute_VDP_YMMM:1071 ld a, 34 1072 di1073 out (PORT_1), a1074 ld a, 17 + 1281075 out (PORT_1), a1076 ld c, 0x9B1077.vdpReady:1078 ld a, 21079 di1080 out (PORT_1), a 1081 ld a, 15 + 1281082 out (PORT_1), a1083 in a, (PORT_1)1084 rra1085 ld a, 0 1086 out (PORT_1), a1087 ld a, 15 + 1281088 ei1089 out (PORT_1), a 1090 jp c, .vdpReady1091 outi 1092 outi 1093 outi1094 outi1095 outi1096 outi1097 outi1098 outi1099 outi1100 outi1101 outi1102 outi1103 outi1104 ret1106VDP_COMMAND_HMMC: equ 1111 0000 b 1107VDP_COMMAND_YMMM: equ 1110 0000 b 1108VDP_COMMAND_HMMM: equ 1101 0000 b 1109VDP_COMMAND_HMMV: equ 1100 0000 b 11111112VDP_COMMAND_LMMC: equ 1011 0000 b 1113VDP_COMMAND_LMCM: equ 1010 0000 b 1114VDP_COMMAND_LMMM: equ 1001 0000 b 1115VDP_COMMAND_LMMV: equ 1000 0000 b 1117VDP_COMMAND_LINE: equ 0111 0000 b1118VDP_COMMAND_SRCH: equ 0110 0000 b1119VDP_COMMAND_PSET: equ 0101 0000 b1120VDP_COMMAND_POINT: equ 0100 0000 b1122VDP_COMMAND_STOP: equ 0000 0000 b11251126VDP_LOGIC_OPERATION_IMP: equ 0000 b1127VDP_LOGIC_OPERATION_AND: equ 0001 b1128VDP_LOGIC_OPERATION_OR: equ 0010 b1129VDP_LOGIC_OPERATION_XOR: equ 0011 b1130VDP_LOGIC_OPERATION_NOT: equ 0100 b1132VDP_LOGIC_OPERATION_TIMP: equ 1000 b1133VDP_LOGIC_OPERATION_TAND: equ 1001 b1134VDP_LOGIC_OPERATION_TOR: equ 1010 b1135VDP_LOGIC_OPERATION_TXOR: equ 1011 b1136VDP_LOGIC_OPERATION_TNOT: equ 1100 b11411145ReadStatusReg:11461147 ld a,(0007h) 1148 inc a1149 ld c,a 1151 out (c),b1152 ld a,080h+151153 out (c),a11541155 1156 ld a,(0006h) 1157 inc a1158 ld c,a 1159 in b,(c) 1160 11611162 ld a,(0007h) 1163 inc a1164 ld c,a 1165 xor a1166 out (c),a1167 ld a,080h+151168 out (c),a1169 1171 ret11741175WRTVDP_without_DI_EI:1176 ld a, b1177 1178 out (PORT_1),a1179 ld a, c1180 or 1281181 1183 out (PORT_1), a1184 ret11881191SNSMAT_NO_DI_EI:1192 ld c, a1193.C_OK:11941195 in a, (PPI.C)1196 and 0xf0 1197 or c11981199 out (PPI.C), a1200 in a, (PPI.B)1201 ret120412071209JP_HL:1210 jp (hl)1211JP_BC:1212 push bc1213 ret1214JP_DE:1215 push de1216 ret1217JP_IX:1218 jp (ix)1219JP_IY:1220 jp (iy)1221JP_HL_S:1222 exx1223 push hl1224 exx1225 ret1226JP_BC_S:1227 exx1228 push bc1229 exx1230 ret1231JP_DE_S:1232 exx1233 push de1234 exx1235 ret12381240Fast_LDIR_Multiples_of_16:12411242.loop:1243 ldi 1244 ldi1245 ldi1246 ldi1247 ldi1248 ldi1249 ldi1250 ldi1251 ldi1252 ldi1253 ldi1254 ldi1255 ldi1256 ldi1257 ldi1258 ldi1259 jp pe, .loop System\Main.s1516System_Code_Start:17 System/Constants.s134SCREEN_MAPPING_DESKTOP: equ 2555SCREEN_MAPPING_TASKBAR: equ 2546 7SCREEN_MAPPING_WINDOWS: equ 0000 0000 b8SCREEN_MAPPING_WINDOWS_TITLE_BAR: equ 0001 0000 b9SCREEN_MAPPING_WINDOWS_MINIMIZE_BUTTON: equ 0010 0000 b10SCREEN_MAPPING_WINDOWS_MAXIMIZE_RESTORE_BUTTON: equ 0011 0000 b11SCREEN_MAPPING_WINDOWS_CLOSE_BUTTON: equ 0100 0000 b12SCREEN_MAPPING_WINDOWS_RESIZE_CORNER: equ 0101 0000 b15WINDOW_STATE:16.MINIMIZED: equ 117.RESTORED: equ 218.MAXIMIZED: equ 321MOUSE_ON_JOYPORT_1: equ 0x131022MOUSE_ON_JOYPORT_2: equ 0x6C2024MOUSE_PORT: equ MOUSE_ON_JOYPORT_126MOUSE_DOUBLE_CLICK_INTERVAL: equ 30 System\Main.s18 System/Interrupt.s1_INIT_INTERRUPT:3 4 xor a5 ld (os.interruptBusy), a7 ld hl, .storeOldInterruptHook_init8 ld de, os.storeOldInterruptHook9 ld bc, 610 ldir12 ld hl, BIOS_H_TIMI13 ld de, os.storeOldInterruptHook14 ld bc, 515 ldir17 ld hl, INTERRUPT18 ld de, BIOS_H_TIMI19 ld bc, 320 ldir22 ret26.storeOldInterruptHook_init:27 db 0, 0, 0, 0, 028 db 0xc9 30INTERRUPT:31 32 jp HANDLER33 34HANDLER:35 36 ld a, (os.interruptBusy)37 and a38 ret nz39 ld a, 25540 ld (os.interruptBusy), a42 43 call _UPDATE_SYSTEM_TIME44 45 46 ld hl, (OS.ticksSinceLastInput)47 inc hl48 ld (OS.ticksSinceLastInput), hl50 55 58 ld de, MOUSE_PORT59 call GTMOUS60 61 ld a, h62 cp 25563 jp nz, .skip64 cp l65 call z, .noMouse67.skip:69 70 ld a, ixh71 ld (OS.mouseButton_1), a72 ld a, ixl73 ld (OS.mouseButton_2), a76 80 81 ld a, h82 neg83 ld h, a85 86 ld a, l87 neg88 ld l, a90 91 xor a92 or ixh 93 or ixl 94 or h 95 or l 96 jp z, .skip_197 ld de, 098 ld (OS.ticksSinceLastInput), de99.skip_1:100 101 ld e, h 102 ld d, l 103 ld a, (os.mouseX)104 ld l, a 105 ld a, (os.mouseY)106 ld h, a 107 call CLIPADD108 109 ld a, l110 ld (os.mouseX), a111 ld (os.mouseX_1), a112 ld a, h113 ld (os.mouseY), a114 ld (OS.mouseY_1), a116 xor a117 ld (os.interruptBusy), a119 jp os.storeOldInterruptHook121122.noMouse:123 124 ret126131 132System\Main.s19 System/Init/Init.s1 System/Init/InitVdp.s12PATTBL: equ 0x0000 3NAMTBL: equ 0x1800 4SPRATR: equ 0x1b00 6NAMTBL_ALT: equ 0x1c00 8COLTBL: equ 0x2000 9SPRPAT: equ 0x3800 13_INIT_VDP:16 17 ld a, 15 18 ld (BIOS_FORCLR), a 19 ld a, 1 20 ld (BIOS_BAKCLR), a 21 ld a, 4 22 ld (BIOS_BDRCLR), a 23 call BIOS_CHGCLR 25 26 ld a, 227 call BIOS_CHGMOD29 call SetSprites16x1631 36 ld c, 2 37 ld b, 0000 0110 b 38 call BIOS_WRTVDP 41 call BIOS_DISSCR43 44 46 47 xor a 48 ld bc, 1024 * 16 49 ld hl, 0x0000 50 call BIOS_FILVRM52 53 ld hl, TILE_PATTERNS 54 ld de, PATTBL 55 ld bc, TILE_PATTERNS.size 56 call BIOS_LDIRVM 58 ld hl, TILE_PATTERNS 59 ld de, PATTBL + (256 * 8) 60 ld bc, TILE_PATTERNS.size 61 call BIOS_LDIRVM 63 ld hl, TILE_PATTERNS 64 ld de, PATTBL + (512 * 8) 65 ld bc, TILE_PATTERNS.size 66 call BIOS_LDIRVM 68 69 ld a, 0x1f 70 ld bc, 256 * 8 * 3 71 ld hl, COLTBL 72 call BIOS_FILVRM74 75 ld a, 0xf1 76 ld bc, TILE_FONT_REVERSED_PATTERNS.size 77 ld hl, COLTBL + (TILE_FONT_REVERSED_PATTERNS - TILE_PATTERNS) 78 call BIOS_FILVRM79 80 ld a, 0xf1 81 ld bc, TILE_FONT_REVERSED_PATTERNS.size 82 ld hl, COLTBL + (256 * 8) + (TILE_FONT_REVERSED_PATTERNS - TILE_PATTERNS) 83 call BIOS_FILVRM84 85 ld a, 0xf1 86 ld bc, TILE_FONT_REVERSED_PATTERNS.size 87 ld hl, COLTBL + (512 * 8) + (TILE_FONT_REVERSED_PATTERNS - TILE_PATTERNS) 88 call BIOS_FILVRM90 91 ld hl, COLTBL + (TILE_FILLED_COLORS_PATTERNS - TILE_PATTERNS) 92 call .fillTileColor95 96 ld hl, COLTBL + (256 * 8) + (TILE_FILLED_COLORS_PATTERNS - TILE_PATTERNS) 97 call .fillTileColor99 100 ld hl, COLTBL + (512 * 8) + (TILE_FILLED_COLORS_PATTERNS - TILE_PATTERNS) 101 call .fillTileColor105 106 ld hl, SPRITE_PATTERNS 107 ld de, SPRPAT 108 ld bc, SPRITE_PATTERNS.size 109 call BIOS_LDIRVM 112 call BIOS_ENASCR114 ret116.fillTileColor:117 ld d, 2118.loop_Colors:119 push hl, de120 121 sla d 122 sla d 123 sla d 124 sla d 126 ld a, 0000 0001 b127 or d129 ld bc, 8130 call BIOS_FILVRM131 pop de, hl133 ld bc, 8134 add hl, bc136 inc d137 ld a, d138 cp 15139 jp nz, .loop_Colors141 ret142System/Init/Init.s2 System/Init/InitRam.s1_INIT_RAM:3 5 xor a6 ld (RamStart), a7 ld hl, RamStart8 ld de, RamStart + 19 ld bc, RamEnd - RamStart - 110 ldir12 13 ld a, 0xff14 ld (OS.processes), a15 ld hl, OS.processes16 ld de, OS.processes + 117 ld bc, OS.processes_size - 118 ldir19 20 21 ld hl, OS.processes22 ld (OS.nextAvailableProcessAddr), hl24 25 ld hl, 026 ld (OS.currentProcessAddr), hl28 29 ld a, 128 - 830 ld (OS.mouseY), a31 ld (OS.mouseY_1), a32 ld a, 96 - 833 ld (OS.mouseX), a34 ld (OS.mouseX_1), a35 ld a, SPRITE_INDEX_CURSOR_036 ld (OS.mousePattern), a37 ld a, SPRITE_INDEX_CURSOR_138 ld (OS.mousePattern_1), a39 ld a, 1 40 ld (OS.mouseColor), a41 ld a, 15 42 ld (OS.mouseColor_1), a44 xor a45 ld (OS.mouseButton_1), a46 ld (OS.mouseButton_2), a47 ld (OS.oldMouseButton_1), a48 ld (OS.oldMouseButton_2), a49 ld (OS.isDoubleClick), a50 51 ld (OS.isDraggingWindow), a52 ld (OS.dragOffset_X), a53 ld (OS.dragOffset_Y), a54 ld (OS.isResizingWindow), a55 ld (OS.resizeWindowCorner_BottomRight_X_Min), a56 ld (OS.resizeWindowCorner_BottomRight_Y_Min), a58 ld hl, 059 ld (OS.mouseLastClick_Jiffy), hl61 62 ld a, SPRITE_INDEX_WINDOW_TOP_LEFT63 ld (OS.windowCorner_TopLeft_Pattern), a64 ld a, SPRITE_INDEX_WINDOW_BOTTOM_LEFT65 ld (OS.windowCorner_BottomLeft_Pattern), a66 ld a, SPRITE_INDEX_WINDOW_TOP_RIGHT67 ld (OS.windowCorner_TopRight_Pattern), a68 ld a, SPRITE_INDEX_WINDOW_BOTTOM_RIGHT69 ld (OS.windowCorner_BottomRight_Pattern), a71 ld a, 15 72 ld (OS.windowCorner_TopLeft_Color), a73 ld (OS.windowCorner_BottomLeft_Color), a74 ld (OS.windowCorner_TopRight_Color), a75 ld (OS.windowCorner_BottomRight_Color), a77 78 ld a, 1111 1111 b79 ld (OS.oldKeyboardMatrix + 0), a80 ld (OS.oldKeyboardMatrix + 1), a81 ld (OS.oldKeyboardMatrix + 2), a82 ld (OS.oldKeyboardMatrix + 3), a83 ld (OS.oldKeyboardMatrix + 4), a84 ld (OS.oldKeyboardMatrix + 5), a85 ld (OS.oldKeyboardMatrix + 6), a86 ld (OS.oldKeyboardMatrix + 7), a87 ld (OS.oldKeyboardMatrix + 8), a88 ld (OS.oldKeyboardMatrix + 9), a91 92 ld a, 093 ld (OS.nextWindow_x), a94 ld a, 095 ld (OS.nextWindow_y), a97 xor a98 ld (OS.mouseOver_Activated), a99 ld (OS.mouseOver_screenMappingValue), a100 ld (OS.mouseOver_tileToBeRestored), a101 ld hl, 0102 ld (OS.mouseOver_NAMTBL_addr), a106 call _INIT_SCREEN_MAPPING110 ret113System/Init/Init.s7_INIT:9 10 xor a11 ld (BIOS_CLIKSW), a13 call _INIT_VDP15 call _INIT_RAM17 call _INIT_SYSTEM_TIME19 call _INIT_INTERRUPT21 call _INIT_DESKTOP25 28 call _DRAW_DESKTOP29 call _DRAW_TASKBAR31 ret34System\Main.s20 System/Desktop/Desktop.s1 System/Desktop/Taskbar.s1810_DRAW_TASKBAR:12 13 ld hl, TASKBAR_INIT 14 ld de, NAMTBL + (32 * 22) 15 ld bc, 64 16 call BIOS_LDIRVM 20 call _DRAW_TASKBAR_BUTTONS23 call _DRAW_TASKBAR_CLOCK26 ret30_DRAW_TASKBAR_BUTTONS:32 ld iy, NAMTBL + (32 * 23) + 534 35 ld hl, 0xffff36 ld (OS.taskbar_Button_0_Process_addr), hl37 ld (OS.taskbar_Button_1_Process_addr), hl38 ld (OS.taskbar_Button_2_Process_addr), hl39 ld (OS.taskbar_Button_3_Process_addr), hl41 ld hl, OS.taskbar_Button_0_Process_addr42 ld (OS.tempWord), hl44 45 ld hl, OS.processes46 ld b, MAX_PROCESS_ID + 147.loop_1:48 ld a, (hl)49 inc a50 jp z, .next 52 55 push hl 56 pop ix58 59 push de60 ld de, (OS.tempWord)62 ld a, l63 ld (de), a64 inc de65 ld a, h66 ld (de), a67 inc de69 ld (OS.tempWord), de70 pop de72 push hl, bc73 74 ld bc, PROCESS_STRUCT_IX.taskbarTitle75 add hl, bc77 push hl 78 pop de80 push iy 81 pop hl82 call BIOS_SETWRT84 ld c, 4 86 .loop_2:87 91 push de93 ld de, (OS.currentProcessAddr)94 95 push ix 96 pop hl98 call BIOS_DCOMPR100 pop de102 jp nz, .printNormal104 105 ld a, (de)106 107 cp TILE_EMPTY_BLACK108 jp z, .printTileWhite109 110 add TILE_FONT_LOWERCASE_A - TILE_FONT_REVERSED_LOWERCASE_A111 jp .continue_2112 113 .printTileWhite:114 ld a, TILE_EMPTY115 jp .continue_2116 117 .printNormal:118 ld a, (de)119 .continue_2:120 out (PORT_0), a122 dec c123 jp z, .end_1125 inc de126 jp .loop_2128 .end_1:129 130 ld bc, 5131 add iy, bc 133 pop bc, hl137.next:138 ld de, Process_struct.size139 add hl, de141 djnz .loop_1143 ret147148_DRAW_TASKBAR_CLOCK:150 151 ld hl, NAMTBL + (32 * 23) + 26 152 call BIOS_SETWRT153 ld c, PORT_0156 ld b, TILE_FONT_REVERSED_NUMBERS_0158 159 ld a, (OS.currentTime_Hours)160 srl a 161 srl a 162 srl a 163 srl a 164 or a165 jp z, .skipTensOfHours 166 add b 167 jp .continue168.skipTensOfHours:169 ld a, TILE_EMPTY_BLACK170.continue:171 out (c), a173 174 ld a, (OS.currentTime_Hours)175 and 0000 1111 b176 add b 177 out (c), a179 180 nop181 nop182 ld a, TILE_FONT_REVERSED_SYMBOLS + 0 183 out (c), a185 186 ld a, (OS.currentTime_Minutes)187 srl a 188 srl a 189 srl a 190 srl a 191 add b 192 out (c), a193 194 195 ld a, (OS.currentTime_Minutes)196 and 0000 1111 b197 add b 198 out (c), a200 ret204TASKBAR_INIT:205 206 db TILE_TASKBAR_TOP, TILE_TASKBAR_TOP, TILE_TASKBAR_TOP, TILE_TASKBAR_TOP207 db TILE_TASKBAR_TOP, TILE_TASKBAR_TOP, TILE_TASKBAR_TOP, TILE_TASKBAR_TOP208 db TILE_TASKBAR_TOP, TILE_TASKBAR_TOP, TILE_TASKBAR_TOP, TILE_TASKBAR_TOP209 db TILE_TASKBAR_TOP, TILE_TASKBAR_TOP, TILE_TASKBAR_TOP, TILE_TASKBAR_TOP210 db TILE_TASKBAR_TOP, TILE_TASKBAR_TOP, TILE_TASKBAR_TOP, TILE_TASKBAR_TOP211 db TILE_TASKBAR_TOP, TILE_TASKBAR_TOP, TILE_TASKBAR_TOP, TILE_TASKBAR_TOP212 db TILE_TASKBAR_TOP, TILE_TASKBAR_TOP, TILE_TASKBAR_TOP, TILE_TASKBAR_TOP213 db TILE_TASKBAR_TOP, TILE_TASKBAR_TOP, TILE_TASKBAR_TOP, TILE_TASKBAR_TOP215 216 db TILE_EMPTY_BLACK, TILE_HOME_ICON, TILE_EMPTY_BLACK217 218 db TILE_SHOW_DESKTOP_ICON, TILE_EMPTY_BLACK220 db TILE_EMPTY_BLACK221 db TILE_EMPTY_BLACK, TILE_EMPTY_BLACK, TILE_EMPTY_BLACK, TILE_EMPTY_BLACK222 db TILE_EMPTY_BLACK, TILE_EMPTY_BLACK223 224 db TILE_EMPTY_BLACK225 226 db TILE_EMPTY_BLACK, TILE_EMPTY_BLACK, TILE_EMPTY_BLACK, TILE_EMPTY_BLACK227 228 db TILE_EMPTY_BLACK, TILE_EMPTY_BLACK, TILE_EMPTY_BLACK229 db TILE_EMPTY_BLACK, TILE_EMPTY_BLACK, TILE_EMPTY_BLACK, TILE_EMPTY_BLACK230 231 db TILE_EMPTY_BLACK, TILE_EMPTY_BLACK232 233 db TILE_EMPTY_BLACK, TILE_EMPTY_BLACK, TILE_EMPTY_BLACK, TILE_EMPTY_BLACK, TILE_EMPTY_BLACK234 235 db TILE_EMPTY_BLACK236System/Desktop/Desktop.s4_INIT_DESKTOP:5 6 ld ix, Notepad.Header7 ld de, PATTBL + (TILE_BASE_DESKTOP_ICON_0 * 8) 8 call _LOAD_ICON_FROM_APP_HEADER9 11 ld ix, Calc.Header12 ld de, PATTBL + (TILE_BASE_DESKTOP_ICON_1 * 8) 13 call _LOAD_ICON_FROM_APP_HEADER14 16 18 ld ix, Paint.Header19 ld de, PATTBL + (256 * 8) + (TILE_BASE_DESKTOP_ICON_0 * 8) 20 call _LOAD_ICON_FROM_APP_HEADER22 ld ix, TicTacToe.Header23 ld de, PATTBL + (256 * 8) + (TILE_BASE_DESKTOP_ICON_1 * 8) 24 call _LOAD_ICON_FROM_APP_HEADER26 28 ld ix, Settings.Header29 ld de, PATTBL + (512 * 8) + (TILE_BASE_DESKTOP_ICON_0 * 8) 30 call _LOAD_ICON_FROM_APP_HEADER32 ld ix, Tetra.Header33 ld de, PATTBL + (512 * 8) + (TILE_BASE_DESKTOP_ICON_1 * 8) 34 call _LOAD_ICON_FROM_APP_HEADER36 38 39 ld a, TILE_EMPTY40 ld (OS.desktop_Tiles), a41 ld hl, OS.desktop_Tiles42 ld de, OS.desktop_Tiles + 143 ld bc, 0 + (32 * 22) - 144 ldir47 55 61 64 68 72 76 77 ld ix, Notepad.Header78 ld a, TILE_BASE_DESKTOP_ICON_079 ld hl, OS.desktop_Tiles80 call _DRAW_DESKTOP_ICON82 83 ld ix, Calc.Header84 ld a, TILE_BASE_DESKTOP_ICON_185 ld hl, OS.desktop_Tiles + 886 call _DRAW_DESKTOP_ICON90 91 ld ix, Paint.Header92 ld a, TILE_BASE_DESKTOP_ICON_093 ld hl, OS.desktop_Tiles + (256)94 call _DRAW_DESKTOP_ICON96 97 ld ix, TicTacToe.Header98 ld a, TILE_BASE_DESKTOP_ICON_199 ld hl, OS.desktop_Tiles + (256) + 8100 call _DRAW_DESKTOP_ICON104 105 ld ix, Settings.Header106 ld a, TILE_BASE_DESKTOP_ICON_0107 ld hl, OS.desktop_Tiles + (512)108 call _DRAW_DESKTOP_ICON110 111 ld ix, Tetra.Header112 ld a, TILE_BASE_DESKTOP_ICON_1113 ld hl, OS.desktop_Tiles + (512) + 8114 call _DRAW_DESKTOP_ICON116 ret120125_LOAD_ICON_FROM_APP_HEADER:127 128 ld l, (ix + PROCESS_STRUCT_IX.iconAddr)129 ld h, (ix + PROCESS_STRUCT_IX.iconAddr + 1)131 133 ld bc, NUMBER_OF_TILES_PER_ICON * 8 134 call BIOS_LDIRVM136 ret140145_LOAD_ICON_INVERTED_FROM_APP_HEADER:147 push de148 149 ld l, (ix + PROCESS_STRUCT_IX.iconAddr)150 ld h, (ix + PROCESS_STRUCT_IX.iconAddr + 1)152 153 ld de, OS.tempIcon154 ld bc, NUMBER_OF_TILES_PER_ICON * 8 155 ldir157 ld hl, OS.tempIcon158 ld b, NUMBER_OF_TILES_PER_ICON * 8159 .loop_100:160 ld a, (hl)161 cpl 162 ld (hl), a163 inc hl164 djnz .loop_100166 167 ld hl, OS.tempIcon168 ld de, ICON_BORDERS_FILLED_OR_MASK169 ld b, NUMBER_OF_TILES_PER_ICON * 8170 .loop_200:171 ld a, (hl)172 ld c, a173 ld a, (de)174 or c175 ld (hl), a176 inc hl177 inc de178 djnz .loop_200179 180 182 pop de184 ld hl, OS.tempIcon 186 ld bc, NUMBER_OF_TILES_PER_ICON * 8 187 call BIOS_LDIRVM189 ret193_DRAW_DESKTOP_ICON:194 push hl195 ld de, 0 + (32 * 1) + 3196 add hl, de197 198 199 ld de, 32201 ld b, 3202 .loop_1:203 push hl204 ld (hl), a205 206 inc a207 add hl, de208 ld (hl), a210 inc a211 add hl, de212 ld (hl), a214 inc a215 pop hl216 inc hl218 djnz .loop_1219 pop hl221 222 ld de, 0 + (32 * 4) + 1223 add hl, de224 ld b, 7 225.loop_10:226 ld a, (ix + PROCESS_STRUCT_IX.iconTitle)227 228 ld (hl), a229 inc ix230 inc hl231 djnz .loop_10234 ret238_DRAW_DESKTOP_ICON_NAME_REVERSED:239 240 ld de, 0 + (32 * 4) + 1241 add hl, de242 ld b, 7 243.loop_10:244 ld a, (ix + PROCESS_STRUCT_IX.iconTitle)245 cp TILE_EMPTY246 jp z, .cont_1248251252 sub TILE_FONT_LOWERCASE_A - TILE_FONT_REVERSED_LOWERCASE_A 253.cont_1:254 ld (hl), a255 inc ix256 inc hl257 djnz .loop_10259 ret263_DRAW_DESKTOP:265276 ld hl, NAMTBL277 call BIOS_SETWRT278 ld hl, OS.desktop_Tiles279 ld c, PORT_0281 ld d, 22 282.outerLoop:283 ld b, 32 284 .innerLoop:285 outi286 jp nz, .innerLoop 288 dec d289 jp nz, .outerLoop291 ret294ICON_BORDERS_FILLED_OR_MASK:295 db 11111111 b296 db 10000000 b297 db 10000000 b298 db 10000000 b299 db 10000000 b300 db 10000000 b301 db 10000000 b302 db 10000000 b304 db 10000000 b305 db 10000000 b306 db 10000000 b307 db 10000000 b308 db 10000000 b309 db 10000000 b310 db 10000000 b311 db 10000000 b313 db 10000000 b314 db 10000000 b315 db 10000000 b316 db 10000000 b317 db 10000000 b318 db 10000000 b319 db 10000000 b320 db 11111111 b322 db 11111111 b323 db 00000000 b324 db 00000000 b325 db 00000000 b326 db 00000000 b327 db 00000000 b328 db 00000000 b329 db 00000000 b331 db 00000000 b332 db 00000000 b333 db 00000000 b334 db 00000000 b335 db 00000000 b336 db 00000000 b337 db 00000000 b338 db 00000000 b340 db 00000000 b341 db 00000000 b342 db 00000000 b343 db 00000000 b344 db 00000000 b345 db 00000000 b346 db 00000000 b347 db 11111111 b350 db 11111111 b351 db 00000001 b352 db 00000001 b353 db 00000001 b354 db 00000001 b355 db 00000001 b356 db 00000001 b357 db 00000001 b359 db 00000001 b360 db 00000001 b361 db 00000001 b362 db 00000001 b363 db 00000001 b364 db 00000001 b365 db 00000001 b366 db 00000001 b368 db 00000001 b369 db 00000001 b370 db 00000001 b371 db 00000001 b372 db 00000001 b373 db 00000001 b374 db 00000001 b375 db 11111111 b376System\Main.s21 System/Window/Window.s1 System/Window/DrawWindow.s13_DRAW_WINDOW:5 7 8 ld a, (ix + PROCESS_STRUCT_IX.windowState) 9 cp WINDOW_STATE.MINIMIZED10 ret z12 13 cp WINDOW_STATE.MAXIMIZED14 jp z, _DRAW_WINDOW_MAXIMIZED15 16 17 ld l, (ix + PROCESS_STRUCT_IX.x) 18 ld h, (ix + PROCESS_STRUCT_IX.y) 19 20 call _CONVERT_COL_LINE_TO_LINEAR21 22 27 28 ld bc, NAMTBL29 add hl, bc33 34 38 39 push hl40 call BIOS_SETWRT41 42 ld a, TILE_WINDOW_TITLE_TOP_LEFT43 out (PORT_0), a45 ld a, (ix + PROCESS_STRUCT_IX.width) 46 sub 2 47 ld b, a48 .loop_1: 49 ld a, TILE_WINDOW_TITLE_MIDDLE_TOP50 out (PORT_0), a51 djnz .loop_153 nop54 nop55 ld a, TILE_WINDOW_TOP_RIGHT_CORNER_TOP56 out (PORT_0), a57 pop hl58 59 60 ld de, 3261 add hl, de62 63 push hl64 call BIOS_SETWRT65 ld a, TILE_WINDOW_TITLE_BOTTOM_LEFT66 out (PORT_0), a67 68 ld a, (ix + PROCESS_STRUCT_IX.width) 69 sub 5 70 ld b, a71 .loop_2:72 ld a, TILE_WINDOW_TITLE_MIDDLE_BOTTOM73 out (PORT_0), a74 djnz .loop_276 nop77 nop78 ld a, TILE_WINDOW_MINIMIZE_BUTTON79 out (PORT_0), a81 nop82 nop83 ld a, TILE_WINDOW_MAXIMIZE_BUTTON84 out (PORT_0), a86 nop87 nop88 ld a, TILE_WINDOW_CLOSE_BUTTON89 out (PORT_0), a91 nop92 nop93 ld a, TILE_WINDOW_TOP_RIGHT_CORNER_BOTTOM94 out (PORT_0), a95 pop hl97 98 push hl, ix99 inc hl100 call BIOS_SETWRT101 102 ld b, 16 103 .loop_10:104 ld a, (ix + PROCESS_STRUCT_IX.windowTitle) 105 or a 106 jp z, .endLoop_10107 out (PORT_0), a108 inc ix109 djnz .loop_10110 .endLoop_10:111 pop ix, hl113 115 ld a, (ix + PROCESS_STRUCT_IX.height) 116 sub 4 117 ld b, a118.loop_height:119 push bc121 ld de, 32122 add hl, de123 124 push hl125 call BIOS_SETWRT126 ld a, TILE_WINDOW_BORDER_LEFT127 out (PORT_0), a129 ld a, (ix + PROCESS_STRUCT_IX.width) 130 sub 2 131 ld b, a132 .loop_3:133 ld a, TILE_EMPTY134 out (PORT_0), a135 djnz .loop_3137 nop138 nop139 ld a, TILE_WINDOW_BORDER_RIGHT140 out (PORT_0), a141 pop hl143 pop bc144 djnz .loop_height146 148 149 ld de, 32150 add hl, de151 152 push hl153 call BIOS_SETWRT154 ld a, TILE_WINDOW_BORDER_LEFT155 out (PORT_0), a156 157 ld a, (ix + PROCESS_STRUCT_IX.width) 158 sub 2 159 ld b, a160 .loop_4:161 ld a, TILE_EMPTY162 out (PORT_0), a163 djnz .loop_4165 nop166 nop167 ld a, TILE_WINDOW_RESIZE_CORNER_TOP168 out (PORT_0), a169 pop hl171 172 ld de, 32173 add hl, de174 175 push hl176 call BIOS_SETWRT177 ld a, TILE_WINDOW_BORDER_BOTTOM_LEFT178 out (PORT_0), a179 180 ld a, (ix + PROCESS_STRUCT_IX.width) 181 sub 3 182 ld b, a183 .loop_5:184 ld a, TILE_WINDOW_BORDER_MIDDLE_BOTTOM185 out (PORT_0), a186 djnz .loop_5188 nop189 nop190 ld a, TILE_WINDOW_RESIZE_CORNER_LEFT191 out (PORT_0), a193 nop194 nop195 ld a, TILE_WINDOW_RESIZE_CORNER_RIGHT196 out (PORT_0), a197 pop hl199 202 203 ld l, (ix + PROCESS_STRUCT_IX.ramStartAddr)204 ld h, (ix + PROCESS_STRUCT_IX.ramStartAddr + 1)206 push hl 207 pop iy209 211 ld e, (ix + PROCESS_STRUCT_IX.drawAddr) 212 ld d, (ix + PROCESS_STRUCT_IX.drawAddr + 1) 213 call JP_DE217 ret221_DRAW_WINDOW_MAXIMIZED:222 ld hl, NAMTBL224 225 push hl226 call BIOS_SETWRT227 228 ld a, 32 - 3 229 ld b, a230 .loop_2:231 ld a, TILE_WINDOW_TITLE_MIDDLE_BOTTOM232 out (PORT_0), a233 djnz .loop_2235 nop236 nop237 ld a, TILE_WINDOW_MINIMIZE_BUTTON238 out (PORT_0), a240 nop241 nop242 ld a, TILE_WINDOW_MAXIMIZE_BUTTON243 out (PORT_0), a245 nop246 nop247 ld a, TILE_WINDOW_CLOSE_BUTTON248 out (PORT_0), a249 pop hl251 252 push hl, ix253 inc hl254 call BIOS_SETWRT255 256 ld b, 16 257 .loop_10:258 ld a, (ix + PROCESS_STRUCT_IX.windowTitle) 259 or a 260 jp z, .endLoop_10261 out (PORT_0), a262 inc ix263 djnz .loop_10264 .endLoop_10:265 pop ix, hl268 269 ld bc, 32270 add hl, bc271 call BIOS_SETWRT273 ld a, TILE_EMPTY274 ld c, PORT_0276 ld d, 21 277.outerLoop:278 ld b, 32 279 .innerLoop:280 out (c), a281 nop282 djnz .innerLoop283 dec d284 jp nz, .outerLoop287 290 291 ld l, (ix + PROCESS_STRUCT_IX.ramStartAddr)292 ld h, (ix + PROCESS_STRUCT_IX.ramStartAddr + 1)294 push hl 295 pop iy297 299 ld e, (ix + PROCESS_STRUCT_IX.drawAddr) 300 ld d, (ix + PROCESS_STRUCT_IX.drawAddr + 1) 301 call JP_DE305 ret309312_DRAW_STRING:313 314 call BIOS_SETWRT315 316.loop:317 ld a, (de)318 or a319 ret z 321 325 326 327 cp 32328 jp z, .setTileEmpty330 331 add -65 + TILE_FONT_UPPERCASE_A 334.continue:335 out (PORT_0), a337 inc de339 jp .loop341.setTileEmpty:342 ld a, TILE_EMPTY343 jp .continue345System/Window/Window.s2 System/Window/CloseWindow.s13_CLOSE_WINDOW:5 10 12 retSystem/Window/Window.s3 System/Window/ScreenMapping.s14_UPDATE_SCREEN:6 12 16 call Wait_Vblank18 call _DRAW_DESKTOP22 23 call _INIT_SCREEN_MAPPING25 28 ld c, 0 29 ld de, Process_struct.size31.outerLoop:32 ld hl, OS.processes + PROCESS_STRUCT_IX.layer 34 ld b, MAX_PROCESS_ID + 135 .innerLoop:36 37 ld a, (hl)38 cp c39 push hl, de, bc40 call z, .execute41 pop bc, de, hl43 ld de, Process_struct.size44 add hl, de46 djnz .innerLoop48 inc c49 ld a, c50 cp MAX_PROCESS_ID + 151 ret z53 jp .outerLoop55 57.execute:59 60 ld de, PROCESS_STRUCT_IX.layer61 xor a 62 sbc hl, de64 65 push hl66 pop ix68 69 ld l, (ix + PROCESS_STRUCT_IX.x) 70 ld h, (ix + PROCESS_STRUCT_IX.y) 71 72 push ix73 call _CONVERT_COL_LINE_TO_LINEAR74 pop ix76 call _UPDATE_SCREEN_MAPPING_WINDOW78 call _DRAW_WINDOW80 ret8487_UPDATE_SCREEN_MAPPING_WINDOW:89 90 ld a, (ix + PROCESS_STRUCT_IX.windowState) 91 cp WINDOW_STATE.MINIMIZED92 ret z94 95 cp WINDOW_STATE.MAXIMIZED96 jp z, _UPDATE_SCREEN_MAPPING_WINDOW_MAXIMIZED98 99 ex de, hl100 ld hl, OS.screenMapping101 add hl, de102 103 ld de, 32 105 106 push hl107 ld c, (ix + PROCESS_STRUCT_IX.height) 108 .outerLoop_1:109 push hl110 ld b, (ix + PROCESS_STRUCT_IX.width) 111 .loop_20:112 113 114 ld a, (ix + PROCESS_STRUCT_IX.processId)115 or SCREEN_MAPPING_WINDOWS116 117 ld (hl), a118 inc hl119 djnz .loop_20120 pop hl122 add hl, de123 dec c124 jp nz, .outerLoop_1125 pop hl127 128 ld a, (ix + PROCESS_STRUCT_IX.processId)129 or SCREEN_MAPPING_WINDOWS_TITLE_BAR130 ld c, a132 133 push hl134 ld b, (ix + PROCESS_STRUCT_IX.width) 135 .loop_21:136 ld (hl), c137 inc hl138 djnz .loop_21139 pop hl140 141 add hl, de 142 push hl143 ld a, (ix + PROCESS_STRUCT_IX.width) 144 sub 4 145 ld b, a146 .loop_22:147 ld (hl), c148 inc hl149 djnz .loop_22151 ld a, (ix + PROCESS_STRUCT_IX.processId)152 or SCREEN_MAPPING_WINDOWS_MINIMIZE_BUTTON153 ld (hl), a154 inc hl156 ld a, (ix + PROCESS_STRUCT_IX.processId)157 or SCREEN_MAPPING_WINDOWS_MAXIMIZE_RESTORE_BUTTON158 ld (hl), a159 inc hl161 ld a, (ix + PROCESS_STRUCT_IX.processId)162 or SCREEN_MAPPING_WINDOWS_CLOSE_BUTTON163 ld (hl), a164 inc hl166 pop hl168 170 171 ld a, (ix + PROCESS_STRUCT_IX.x)172 ld l, (ix + PROCESS_STRUCT_IX.width)173 dec l174 add l175 ld l, a177 178 ld a, (ix + PROCESS_STRUCT_IX.y)179 ld h, (ix + PROCESS_STRUCT_IX.height)180 dec h181 add h182 ld h, a183 call _CONVERT_COL_LINE_TO_LINEAR184 185 ld de, OS.screenMapping186 add hl, de188 push hl 189 pop iy191 ld a, (ix + PROCESS_STRUCT_IX.processId)192 or SCREEN_MAPPING_WINDOWS_RESIZE_CORNER193 194 195 ld (iy), a196 ld (iy - 1), a197 ld (iy - 32), a198 ld (iy - 33), a200 ret204_UPDATE_SCREEN_MAPPING_WINDOW_MAXIMIZED:206 207 ld hl, OS.screenMapping208 209 push hl210 211 ld a, (ix + PROCESS_STRUCT_IX.processId)212 or SCREEN_MAPPING_WINDOWS214 ld (hl), a215 ld de, OS.screenMapping + 1216 ld bc, 0 + (32 * 22) - 1217 ldir218 pop hl222 223 ld a, (ix + PROCESS_STRUCT_IX.processId)224 or SCREEN_MAPPING_WINDOWS_TITLE_BAR226 228 ld b, 32 - 3 229 .loop_21:230 ld (hl), a231 inc hl232 djnz .loop_21233 236 ld a, (ix + PROCESS_STRUCT_IX.processId)237 or SCREEN_MAPPING_WINDOWS_MINIMIZE_BUTTON238 ld (hl), a239 inc hl241 ld a, (ix + PROCESS_STRUCT_IX.processId)242 or SCREEN_MAPPING_WINDOWS_MAXIMIZE_RESTORE_BUTTON243 ld (hl), a244 inc hl246 ld a, (ix + PROCESS_STRUCT_IX.processId)247 or SCREEN_MAPPING_WINDOWS_CLOSE_BUTTON248 ld (hl), a249 252 ret256257_INIT_SCREEN_MAPPING:259 260 ld hl, OS.screenMapping261 push hl 262 pop de263 inc de264 ld bc, 0 + (32 * 22) - 1 265 ld a, SCREEN_MAPPING_DESKTOP 266 ld (hl), a267 ldir269274 275276 277283 ld hl, OS.screenMapping + (32*22)285 ld a, SCREEN_MAPPING_TASKBAR 286 ld b, 32 * 2 287.loop_2:288 ld (hl), a289 inc hl290 djnz .loop_2293 retSystem/Window/Window.s4 System/Window/DrawOnWindowUsefulArea.s139DRAW_ON_WINDOW_USEFUL_AREA:11 ld a, c12 ld (OS.tempVar_2), a14 15 xor a16 ld (OS.tempVar_1), a18.outerLoop:20 ld a, (ix + PROCESS_STRUCT_IX.windowState)21 cp WINDOW_STATE.RESTORED22 jp z, .isRestored24 25 ld a, 23 - 1 26 jp .checkHeight28 .isRestored:29 30 ld a, (ix + PROCESS_STRUCT_IX.height)31 sub 3 33 .checkHeight:34 35 push hl36 ld hl, OS.tempVar_137 cp (hl)38 pop hl39 ret z 40 ret c 42 push bc, hl, de44 ex de, hl 45 46 push hl, de47 call BIOS_SETWRT48 pop hl, de 50 ld c, PORT_051 .innerLoop:52 53 outi54 jp nz, .innerLoop 56 pop de58 59 ex de, hl60 ld bc, 3261 add hl, bc62 ex de, hl64 pop hl65 pop bc67 68 ld c, b69 ld b, 070 add hl, bc71 ld b, c73 74 ld a, (OS.tempVar_1) 75 inc a76 ld (OS.tempVar_1), a78 79 ld a, (OS.tempVar_2) 80 dec a81 ld (OS.tempVar_2), a82 jp nz, .outerLoop84 retSystem/Window/Window.s5 System/Window/SetCustomTile.s17SET_CUSTOM_TILE:9 ld b, (ix + PROCESS_STRUCT_IX.vramStartTile)10 add b12 ld (OS.tempWord), hl13 ld (OS.tempWord_2), de15 17 ld h, 018 ld l, a20 add hl, hl 21 add hl, hl22 add hl, hl24 ld c, PORT_026 ex de, hl 28 ld b, 3 29.loop:30 push bc31 ld hl, PATTBL32 add hl, de34 call BIOS_SETWRT36 ld hl, (OS.tempWord)37 ld b, 838 .innerLoop:39 outi40 jp nz, .innerLoop 43 44 ld hl, COLTBL45 add hl, de47 call BIOS_SETWRT49 ld hl, (OS.tempWord_2)50 ld b, 851 .innerLoop_1:52 outi53 jp nz, .innerLoop_1 55 57 ex de, hl58 ld de, 256 * 859 add hl, de60 ex de, hl61 pop bc63 djnz .loop65 retSystem/Window/Window.s915_CONVERT_COL_LINE_TO_LINEAR:16 17 28 xor a 30 srl h 31 rra 32 srl h33 rra34 srl h35 rra37 or l 38 ld l, a40 ret4348GET_USEFUL_WINDOW_BASE_NAMTBL:50 51 ld a, (ix + PROCESS_STRUCT_IX.windowState)52 cp WINDOW_STATE.MAXIMIZED53 jp z, .isMaximized55 56 ld l, (ix + PROCESS_STRUCT_IX.x) 57 ld h, (ix + PROCESS_STRUCT_IX.y) 58 59 call _CONVERT_COL_LINE_TO_LINEAR60 61 ld bc, NAMTBL + (32 * 2) + 162 add hl, bc64 ret66.isMaximized:67 70 ld hl, NAMTBL + 3272 ret7680_GET_WINDOW_TITLE_BASE_NAMTBL:82 83 ld a, (ix + PROCESS_STRUCT_IX.windowState)84 cp WINDOW_STATE.MAXIMIZED85 jp z, .isMaximized87 88 ld l, (ix + PROCESS_STRUCT_IX.x) 89 ld h, (ix + PROCESS_STRUCT_IX.y) 90 91 call _CONVERT_COL_LINE_TO_LINEAR92 93 ld bc, NAMTBL94 add hl, bc96 ret98.isMaximized:99 ld hl, NAMTBL101 ret105109GET_WINDOW_USEFUL_WIDTH:110 ld a, (ix + PROCESS_STRUCT_IX.windowState)111 cp WINDOW_STATE.RESTORED112 jp z, .isRestored114 115 ld a, 32116 117 ret119.isRestored:120 ld a, (ix + PROCESS_STRUCT_IX.width)121 sub 2 123 ret127131GET_WINDOW_USEFUL_HEIGHT:133 ld a, (ix + PROCESS_STRUCT_IX.windowState)134 cp WINDOW_STATE.RESTORED135 jp z, .isRestored137 138 ld a, 24 - 2 - 1 139 140 ret142.isRestored:143 ld a, (ix + PROCESS_STRUCT_IX.height)144 sub 3 146 ret150155GET_WINDOW_LAST_USEFUL_COLUMN:156 ld a, (ix + PROCESS_STRUCT_IX.windowState)157 cp WINDOW_STATE.RESTORED158 jp z, .isRestored160 161 ld a, 31162 163 ret165.isRestored:166 ld a, (ix + PROCESS_STRUCT_IX.x)167 ld b, (ix + PROCESS_STRUCT_IX.width)168 sub 4169 add b171 ret175180GET_WINDOW_NAMTBL_LAST_USEFUL_COLUMN:182 183 ld a, (ix + PROCESS_STRUCT_IX.windowState)184 cp WINDOW_STATE.MAXIMIZED185 jp z, .isMaximized187 188 ld a, (ix + PROCESS_STRUCT_IX.x) 189 ld b, (ix + PROCESS_STRUCT_IX.width)190 add b191 sub 2 192 ld l, a194 ld h, (ix + PROCESS_STRUCT_IX.y) 195 196 call _CONVERT_COL_LINE_TO_LINEAR197 198 ld bc, NAMTBL + (32 * 2)199 add hl, bc201 ret204.isMaximized:205 ld hl, NAMTBL + 32 + 31 207 ret208System\Main.s22 System/Keyboard/Keyboard.s1 18ASCII_CODE_LOWERCASE_A: equ 972122_READ_KEYBOARD:24 25 ld a, (BIOS_NEWKEY + 6)26 bit 2, a27 ret nz29 31 32 ld hl, (BIOS_NEWKEY + 3)34 35 ld bc, (BIOS_NEWKEY + 5)37 40 push hl, bc, de41 42 bit 2, h 43 jp z, .keyPressed_M45 bit 3, h 46 jp z, .keyPressed_N48 bit 5, h 49 jp z, .keyPressed_P51 52 bit 0, l 53 jp z, .keyPressed_C55 bit 2, l 56 jp z, .keyPressed_E58 59 bit 1, c 60 jp z, .keyPressed_T62 bit 0, c 63 jp z, .keyPressed_S65 .continue:66 pop de, bc, hl69 70 ld (OS.oldKeyboardMatrix + 3), hl71 ld (OS.oldKeyboardMatrix + 5), bc72 74 ret76.keyPressed_M:77 78 ld a, (OS.oldKeyboardMatrix + 4)79 bit 2, a 80 jp z, .continue82 83 call _MINIMIZE_ALL_PROCESSES85 jp .continue87.keyPressed_N:88 89 ld a, (OS.oldKeyboardMatrix + 4)90 bit 3, a 91 jp z, .continue93 94 ld hl, Notepad.Header95 call _LOAD_PROCESS97 jp .continue99.keyPressed_P:100 101 ld a, (OS.oldKeyboardMatrix + 4)102 bit 5, a 103 jp z, .continue105 106 ld hl, Paint.Header107 call _LOAD_PROCESS109 jp .continue111.keyPressed_C:112 113 ld a, (OS.oldKeyboardMatrix + 3)114 bit 0, a 115 jp z, .continue117 118 ld hl, Calc.Header119 call _LOAD_PROCESS121 jp .continue123.keyPressed_E:124 125 ld a, (OS.oldKeyboardMatrix + 3)126 bit 2, a 127 jp z, .continue129 130 ld hl, Tetra.Header131 call _LOAD_PROCESS133 jp .continue135.keyPressed_S:136 137 ld a, (OS.oldKeyboardMatrix + 5)138 bit 0, a 139 jp z, .continue141 142 ld hl, Settings.Header143 call _LOAD_PROCESS145 jp .continue147.keyPressed_T:148 149 ld a, (OS.oldKeyboardMatrix + 5)150 bit 1, a 151 jp z, .continue153 154 ld hl, TicTacToe.Header155 call _LOAD_PROCESS157 jp .continue160164 165168170173 174179185191193 194196198201204207210213216219222224226229232235238241244247251255259263267271275279284288290295297300System\Main.s23 System/Mouse/Mouse.s1 System/Mouse/DrawMouseCursor.s1_DRAW_MOUSE_CURSOR:3 4 ld hl, SPRATR5 call BIOS_SETWRT6 ld c, PORT_07 ld hl, OS.mouseSpriteAttributes9 ld a, (hl) 10 dec a11 inc hl12 out (c), a 14 17 nop18 nop19 nop20 outi 22 nop23 nop24 nop25 outi 27 nop28 nop29 nop30 outi 32 ld a, (hl) 33 dec a34 inc hl35 out (c), a 37 nop38 nop39 nop40 outi 42 nop43 nop44 nop45 outi 47 nop48 nop49 nop50 outi 5464 65 ld a, (OS.isDraggingWindow)66 ld b, a67 ld a, (OS.isResizingWindow)68 or b69 jp z, .skip_171 ld a, (hl) 72 dec a73 inc hl74 out (c), a 76 nop77 nop78 nop79 outi 81 nop82 nop83 nop84 outi 86 nop87 nop88 nop89 outi 92 ld a, (hl) 93 dec a94 inc hl95 out (c), a 97 nop98 nop99 nop100 outi 102 nop103 nop104 nop105 outi 107 nop108 nop109 nop110 outi 113 ld a, (hl) 114 dec a115 inc hl116 out (c), a 118 nop119 nop120 nop121 outi 123 nop124 nop125 nop126 outi 128 nop129 nop130 nop131 outi 134 ld a, (hl) 135 dec a136 inc hl137 out (c), a 139 nop140 nop141 nop142 outi 144 nop145 nop146 nop147 outi 149 nop150 nop151 nop152 outi 157.skip_1:158 nop159 nop160 ld a, 208161 out (c), a 165 166 ld a, (OS.mouseX) 168 srl a 169 srl a 170 srl a 171 ld l, a173 ld a, (OS.mouseY) 175 srl a 176 srl a 177 srl a 178 ld h, a180 call _CONVERT_COL_LINE_TO_LINEAR182 ld bc, OS.screenMapping183 add hl, bc185 ld a, (hl)187 ld (OS.currentTileMouseOver), a193 ret195198System/Mouse/Mouse.s2 System/Mouse/MouseClick.s1_MOUSE_CLICK:3 10 11 ld a, (OS.isDraggingWindow)12 or a13 jp z, .skip_10014 15 ld a, (OS.mouseButton_1) 16 or a17 jp z, _END_DRAG_WINDOW18 jp _DO_DRAG_WINDOW19 jp .skip_121.skip_100:22 23 ld a, (OS.isResizingWindow)24 or a25 jp z, .skip_126 27 ld a, (OS.mouseButton_1) 28 or a29 jp z, _END_RESIZE_WINDOW30 jp _DO_RESIZE_WINDOW31 33.skip_1:35 37 ld a, (OS.mouseButton_1) 38 ld b, a39 or a40 jp z, .return43 ld a, (OS.oldMouseButton_1) 44 or a45 jp nz, .return48 49 ld a, b50 ld (OS.oldMouseButton_1), a53 55 56 ld de, (OS.mouseLastClick_Jiffy)57 ld hl, (BIOS_JIFFY)58 ld (OS.mouseLastClick_Jiffy), hl 59 xor a 60 sbc hl, de 62 ld de, MOUSE_DOUBLE_CLICK_INTERVAL63 call BIOS_DCOMPR 64 jp nc, .isNotDoubleClick65 66 ld a, 167 jp .continue_168.isNotDoubleClick:69 xor a 70.continue_1:71 ld (OS.isDoubleClick), a75 76 ld a, (OS.currentTileMouseOver)78 79 cp SCREEN_MAPPING_DESKTOP 80 jp z, .click_Desktop81 cp SCREEN_MAPPING_TASKBAR 82 jp z, .click_Taskbar84 85 and 0000 1111 b 86 ld c, a88 93 ld a, (OS.currentTileMouseOver)94 and 1111 0000 b 96 cp SCREEN_MAPPING_WINDOWS97 jp z, .click_Window99 cp SCREEN_MAPPING_WINDOWS_TITLE_BAR100 jp z, .click_WindowTitleBar102 cp SCREEN_MAPPING_WINDOWS_CLOSE_BUTTON103 jp z, .click_WindowCloseButton105 cp SCREEN_MAPPING_WINDOWS_MAXIMIZE_RESTORE_BUTTON106 jp z, .click_WindowMaximizeButton108 cp SCREEN_MAPPING_WINDOWS_MINIMIZE_BUTTON109 jp z, .click_WindowMinimizeButton111 cp SCREEN_MAPPING_WINDOWS_RESIZE_CORNER112 jp z, .click_WindowResizeCorner114 ret116.return:117 118 ld a, b119 ld (OS.oldMouseButton_1), a120 ret122124.click_Window:127 128 call _GET_PROCESS_BY_ID129 ret nz131 push hl 132 call z, _SET_CURRENT_PROCESS133 pop ix135 136 ld l, (ix + PROCESS_STRUCT_IX.ramStartAddr)137 ld h, (ix + PROCESS_STRUCT_IX.ramStartAddr + 1)139 push hl 140 pop iy142 143 call GET_MOUSE_POSITION_IN_TILES145 147 ld a, (ix + PROCESS_STRUCT_IX.windowState) 148 cp WINDOW_STATE.RESTORED149 150 jp nz, .cont_1153 ld a, l154 sub (ix + PROCESS_STRUCT_IX.x)155 dec a 156 ld l, a158 ld a, h159 sub (ix + PROCESS_STRUCT_IX.y)160 ld h, a161 dec h 162.cont_1:164 dec h 166 167 ld e, (ix + PROCESS_STRUCT_IX.clickAddr) 168 ld d, (ix + PROCESS_STRUCT_IX.clickAddr + 1) 169 call JP_DE171 ret173175.click_WindowTitleBar:178 179 ld a, (OS.isDoubleClick)180 or a181 jp nz, .click_WindowMaximizeButton184 185 call _GET_PROCESS_BY_ID186 push hl187 call z, _SET_CURRENT_PROCESS188 pop ix190 206 call _START_DRAG_WINDOW208 ret211213.click_WindowCloseButton:215 216 call _GET_PROCESS_BY_ID218 ret nz220 call _CLOSE_PROCESS222 ret224226.click_WindowMinimizeButton:228 229 call _GET_PROCESS_BY_ID230 ret nz232 call _MINIMIZE_PROCESS234 ret236238239.click_WindowMaximizeButton:241 242 call _GET_PROCESS_BY_ID243 ret nz245 push hl 246 pop ix248 252 ld a, (ix + PROCESS_STRUCT_IX.windowState)253 cp WINDOW_STATE.RESTORED254 jp z, .isRestored256 call _RESTORE_PROCESS257 ret259.isRestored:260 call _MAXIMIZE_PROCESS261 ret263265.click_WindowResizeCorner:267 268 call _GET_PROCESS_BY_ID269 push hl270 call z, _SET_CURRENT_PROCESS271 pop ix273 call _START_RESIZE_WINDOW275 ret277279.click_Desktop:282 284 ld h, 3 * 8 285 ld l, 1 * 8 286 ld ix, Notepad.Header 287 ld de, PATTBL + (TILE_BASE_DESKTOP_ICON_0 * 8) 288 ld bc, OS.desktop_Tiles 289 call _CHECK_CLICK_DESKTOP_ICON290 ret nz 292 294 ld h, 11 * 8 295 ld l, 1 * 8 296 ld ix, Calc.Header 297 ld de, PATTBL + (TILE_BASE_DESKTOP_ICON_1 * 8) 298 ld bc, OS.desktop_Tiles + 8 299 call _CHECK_CLICK_DESKTOP_ICON300 ret nz 302 304 ld h, 3 * 8 305 ld l, 9 * 8 306 ld ix, Paint.Header 307 ld de, PATTBL + (256 * 8) + (TILE_BASE_DESKTOP_ICON_0 * 8) 308 ld bc, OS.desktop_Tiles + 256 309 call _CHECK_CLICK_DESKTOP_ICON310 ret nz 312 314 ld h, 11 * 8 315 ld l, 9 * 8 316 ld ix, TicTacToe.Header 317 ld de, PATTBL + (256 * 8) + (TILE_BASE_DESKTOP_ICON_1 * 8) 318 ld bc, OS.desktop_Tiles + 256 + 8 319 call _CHECK_CLICK_DESKTOP_ICON320 ret nz 322 324 ld h, 3 * 8 325 ld l, 17 * 8 326 ld ix, Settings.Header 327 ld de, PATTBL + (512 * 8) + (TILE_BASE_DESKTOP_ICON_0 * 8) 328 ld bc, OS.desktop_Tiles + 512 329 call _CHECK_CLICK_DESKTOP_ICON330 ret nz 332 334 ld h, 11 * 8 335 ld l, 17 * 8 336 ld ix, Tetra.Header 337 ld de, PATTBL + (512 * 8) + (TILE_BASE_DESKTOP_ICON_1 * 8) 338 ld bc, OS.desktop_Tiles + 512 + 8 339 call _CHECK_CLICK_DESKTOP_ICON340 ret nz 344 346 call _INIT_DESKTOP348 call _UPDATE_SCREEN350 ret352354.click_Taskbar:356 358 ld a, (OS.mouseY)359 cp 191 + 1 - 10 360 ret c364 ld a, (OS.mouseX)365 366 367 cp 26 * 8368 jp nc, .click_Taskbar_Clock370 371 cp 20 * 8372 ld hl, (OS.taskbar_Button_3_Process_addr)373 jp nc, .click_Taskbar_button375 376 cp 15 * 8377 ld hl, (OS.taskbar_Button_2_Process_addr)378 jp nc, .click_Taskbar_button380 381 cp 10 * 8382 ld hl, (OS.taskbar_Button_1_Process_addr)383 jp nc, .click_Taskbar_button385 386 cp 5 * 8387 ld hl, (OS.taskbar_Button_0_Process_addr)388 jp nc, .click_Taskbar_button390 391 cp 3 * 8392 jp c, .skip_10393 cp 4 * 8394 jp c, .click_Taskbar_ShowDesktop395.skip_10:398 ret402.click_Taskbar_ShowDesktop:404 call _MINIMIZE_ALL_PROCESSES405 406 ret409.click_Taskbar_Clock:410 411 ld a, (OS.isDoubleClick)412 or a413 ret z415 416 ld hl, Settings.Header417 call _LOAD_PROCESS420 422 ld ix, (OS.currentProcessAddr)424 425 ld l, (ix + PROCESS_STRUCT_IX.ramStartAddr)426 ld h, (ix + PROCESS_STRUCT_IX.ramStartAddr + 1)428 push hl 429 pop iy431 ld a, SETTINGS_TABS_VALUES.TAB_TIME432 ld (iy + SETTINGS_VARS.TAB_SELECTED), a434 435 ld e, (ix + PROCESS_STRUCT_IX.drawAddr) 436 ld d, (ix + PROCESS_STRUCT_IX.drawAddr + 1) 437 call JP_DE439 ret442444.click_Taskbar_button:446 447 push hl448 inc hl449 ld a, l450 or h451 pop hl452 ret z454 push hl 455 pop ix457 458 ld a, (ix + PROCESS_STRUCT_IX.windowState)459 cp WINDOW_STATE.MINIMIZED460 jp nz, .skip_20462 ld a, (ix + PROCESS_STRUCT_IX.previousWindowState)463 ld (ix + PROCESS_STRUCT_IX.windowState), a464.skip_20:466 call _SET_CURRENT_PROCESS468 ret471480_CHECK_CLICK_DESKTOP_ICON:482 ld a, (OS.mouseX)483 484 cp h 485 jp c, .not_click_icon486 487 ld a, 3 * 8488 add h489 ld h, a490 ld a, (OS.mouseX)491 cp h 492 jp nc, .not_click_icon494 ld a, (OS.mouseY)495 496 cp l 497 jp c, .not_click_icon498 499 ld a, 3 * 8500 add l501 ld l, a502 ld a, (OS.mouseY)503 cp l 504 jp nc, .not_click_icon506 507 ld a, (OS.isDoubleClick)508 or a509 jp z, .isNotDoubleClick_1510 push ix 511 pop hl512 call _LOAD_PROCESS513 jp .retNZ514.isNotDoubleClick_1:516 518 push ix, hl, de, bc519 call _INIT_DESKTOP520 pop bc, de, hl, ix522 push ix, bc523 525 call _LOAD_ICON_INVERTED_FROM_APP_HEADER526 pop hl, ix528 530 call _DRAW_DESKTOP_ICON_NAME_REVERSED532 call _UPDATE_SCREEN534.retNZ:535 ld a, 1 536 or a537 ret539.not_click_icon:540 xor a 541 retSystem/Mouse/Mouse.s3 System/Mouse/MouseOver.s1_MOUSE_OVER:3 4 ld a, (OS.isDraggingWindow)5 ld b, a6 ld a, (OS.isResizingWindow)7 or b8 ret nz10 11 ld a, (OS.mouseOver_Activated)12 or a13 jp z, .skip_115 16 ld a, (OS.currentTileMouseOver)17 ld b, a18 ld a, (OS.mouseOver_screenMappingValue)19 cp b20 ret z21 22 23 ld a, (OS.mouseOver_screenMappingValue)24 and 1111 0000 b25 cp SCREEN_MAPPING_WINDOWS_RESIZE_CORNER26 jp nz, .notOver_WindowButton27 jp .notOver_ResizeCorner29.skip_1:32 33 ld a, (OS.currentTileMouseOver)35 36 cp SCREEN_MAPPING_DESKTOP 37 ret z38 cp SCREEN_MAPPING_TASKBAR 39 ret z42 43 and 0000 1111 b 44 ld c, a46 ld a, (OS.currentTileMouseOver)47 and 1111 0000 b 50 53 cp SCREEN_MAPPING_WINDOWS_CLOSE_BUTTON54 jp z, .over_WindowCloseButton56 cp SCREEN_MAPPING_WINDOWS_MAXIMIZE_RESTORE_BUTTON57 jp z, .over_WindowMaximizeRestoreButton59 cp SCREEN_MAPPING_WINDOWS_MINIMIZE_BUTTON60 jp z, .over_WindowMinimizeRestoreButton62 cp SCREEN_MAPPING_WINDOWS_RESIZE_CORNER63 jp z, .over_WindowResizeCorner65 ret67.over_WindowCloseButton:69 70 call _GET_PROCESS_BY_ID71 ret nz73 call .getWindowCloseButton_NAMTBL75 ld iy, TILE_WINDOW_CLOSE_BUTTON_PATTERN76 ld b, TILE_WINDOW_CLOSE_BUTTON78 call .setMouseOver80 ret84.over_WindowMaximizeRestoreButton:86 87 call _GET_PROCESS_BY_ID88 ret nz90 call .getWindowCloseButton_NAMTBL91 dec hl 93 ld iy, TILE_WINDOW_MAXIMIZE_BUTTON_PATTERN94 ld b, TILE_WINDOW_MAXIMIZE_BUTTON96 call .setMouseOver98 ret102.over_WindowMinimizeRestoreButton:104 105 call _GET_PROCESS_BY_ID106 ret nz108 call .getWindowCloseButton_NAMTBL109 dec hl110 dec hl 112 ld iy, TILE_WINDOW_MINIMIZE_BUTTON_PATTERN113 ld b, TILE_WINDOW_MINIMIZE_BUTTON115 call .setMouseOver117 ret121.over_WindowResizeCorner:122 123 124 ld a, (OS.mouseOver_Activated)125 or a126 ret nz128 129 ld a, 1130 ld (OS.mouseOver_Activated), a132 133 ld a, (OS.currentTileMouseOver)134 ld (OS.mouseOver_screenMappingValue), a136 137 138 ld hl, SPRITE_CURSOR_RESIZE_PATTERN 139 ld de, SPRPAT + (SPRITE_INDEX_CURSOR_0 * 32) 140 ld bc, SPRITE_CURSOR_RESIZE_PATTERN.size 141 call BIOS_LDIRVM 144 ret148.notOver_ResizeCorner:149 150 xor a151 ld (OS.mouseOver_Activated), a153 154 ld (OS.mouseOver_screenMappingValue), a158 159 ld hl, SPRITE_CURSOR_ARROW_PATTERN 160 ld de, SPRPAT + (SPRITE_INDEX_CURSOR_0 * 32) 161 ld bc, SPRITE_CURSOR_ARROW_PATTERN.size 162 call BIOS_LDIRVM 166 ret170.notOver_WindowButton:172 173 ld a, (OS.mouseOver_screenMappingValue)174 and 0000 1111 b 175 ld c, a178 179 xor a180 ld (OS.mouseOver_Activated), a182 183 ld (OS.mouseOver_screenMappingValue), a186 187 call _GET_PROCESS_BY_ID188 ret nz 191 192 193 194 ld hl, (OS.mouseOver_NAMTBL_addr)195 call BIOS_SETWRT197 198 ld a, (OS.mouseOver_tileToBeRestored)199 out (PORT_0), a201 ret206210.setMouseOver:212214 215 ld a, (OS.mouseOver_Activated)216 or a217 ret nz219 221 ld a, b222 ld (OS.mouseOver_tileToBeRestored), a224 225 ld a, 1226 ld (OS.mouseOver_Activated), a228 229 ld a, (OS.currentTileMouseOver)230 ld (OS.mouseOver_screenMappingValue), a232 236 push hl238 241 ld a, (OS.mouseY)242 cp 64243 jp c, .updateScreenTop244 cp 128245 jp c, .updateScreenMiddle246 jp .updateScreenBottom248.updateScreenTop:249 252 push iy 253 pop hl255 ld de, PATTBL + (TILE_MOUSE_OVER * 8) 256 ld bc, 8 257 call BIOS_LDIRVM 259 ld a, 0xe1 261 ld bc, 8 262 ld hl, COLTBL + (TILE_MOUSE_OVER * 8) 263 call BIOS_FILVRM264 265 jp .continue_1267.updateScreenMiddle:268 271 push iy 272 pop hl274 ld de, PATTBL + (256 * 8) + (TILE_MOUSE_OVER * 8) 275 ld bc, 8 276 call BIOS_LDIRVM 278 ld a, 0xe1 279 ld bc, 8 280 ld hl, COLTBL + (256 * 8) + (TILE_MOUSE_OVER * 8) 281 call BIOS_FILVRM282 283 jp .continue_1285.updateScreenBottom:286 289 push iy 290 pop hl292 ld de, PATTBL + (512 * 8) + (TILE_MOUSE_OVER * 8) 293 ld bc, 8 294 call BIOS_LDIRVM 296 ld a, 0xe1 297 ld bc, 8 298 ld hl, COLTBL + (512 * 8) + (TILE_MOUSE_OVER * 8) 299 call BIOS_FILVRM300 301.continue_1:303 pop hl305 306 307 ld (OS.mouseOver_NAMTBL_addr), hl309 310 call BIOS_SETWRT311 ld a, TILE_MOUSE_OVER312 out (PORT_0), a314 ret316323330332339341344348352.getWindowCloseButton_NAMTBL:353 push hl 354 pop ix355 call _GET_WINDOW_TITLE_BASE_NAMTBL356 357 ld a, (ix + PROCESS_STRUCT_IX.windowState)358 cp WINDOW_STATE.MAXIMIZED359 jp z, .isMaximized361 362 ld c, (ix + PROCESS_STRUCT_IX.width) 363 ld b, 0364 add hl, bc365 ld bc, 32 - 2 366 add hl, bc367 368 ret370.isMaximized:371 ld bc, 32 - 1372 add hl, bc373 374 retSystem/Mouse/Mouse.s4 System/Mouse/DisableMouseOver.s13_DISABLE_MOUSE_OVER:4 6 xor a7 ld (OS.mouseOver_Activated), a9 10 ld (OS.mouseOver_screenMappingValue), a12 13 ld hl, (OS.mouseOver_NAMTBL_addr)14 call BIOS_SETWRT16 ld a, TILE_EMPTY17 out (PORT_0), a19 ld a, SCREEN_MAPPING_DESKTOP 20 ld (OS.currentTileMouseOver), a21 22 retSystem/Mouse/Mouse.s5 System/Mouse/DragWindow.s13_START_DRAG_WINDOW:5 6 ld a, (ix + PROCESS_STRUCT_IX.windowState)7 cp WINDOW_STATE.RESTORED8 ret nz12 13 ld a, 114 ld (OS.isDraggingWindow), a17 18 ld a, (ix + PROCESS_STRUCT_IX.x) 23 add a 24 add a25 add a26 inc a 27 ld (OS.windowCorner_TopLeft_X), a28 ld b, a30 ld a, (OS.mouseX)32 sub b34 ld (OS.dragOffset_X), a 38 39 ld a, (ix + PROCESS_STRUCT_IX.y) 44 add a 45 add a46 add a47 add 6 48 ld (OS.windowCorner_TopLeft_Y), a49 ld b, a51 ld a, (OS.mouseY)53 sub b55 ld (OS.dragOffset_Y), a57 call _ADJUST_WINDOW_DRAG_CORNERS61 72 79 ret8384_ADJUST_WINDOW_DRAG_CORNERS:85 86 ld a, (ix + PROCESS_STRUCT_IX.width)87 add a 88 add a89 add a90 ld b, a91 ld a, (OS.windowCorner_TopLeft_X)92 ld (OS.windowCorner_BottomLeft_X), a93 add b94 sub 16 + 5 95 ld (OS.windowCorner_TopRight_X), a96 ld (OS.windowCorner_BottomRight_X), a97 98 99 ld a, (ix + PROCESS_STRUCT_IX.height)100 add a 101 add a102 add a103 ld b, a104 ld a, (OS.windowCorner_TopLeft_Y)105 ld (OS.windowCorner_TopRight_Y), a106 add b107 sub 16 + 10108 ld (OS.windowCorner_BottomLeft_Y), a109 ld (OS.windowCorner_BottomRight_Y), a111 112 ld a, (BIOS_JIFFY)113 and 0011 1100 b114 srl a 115 srl a 116 ld hl, DRAG_WINDOW_SPRITE_COLOR_LUT117 ld b, 0118 ld c, a119 add hl, bc120 ld a, (hl)121 ld (OS.windowCorner_TopLeft_Color), a122 ld (OS.windowCorner_BottomLeft_Color), a123 ld (OS.windowCorner_TopRight_Color), a124 ld (OS.windowCorner_BottomRight_Color), a126 ret128129DRAG_WINDOW_SPRITE_COLOR_LUT: 130 db 15, 14, 14, 7, 5, 5, 4, 1, 1, 4, 4, 5, 7, 7, 14, 15134_DO_DRAG_WINDOW:135 137 138 ld a, (OS.mouseX)139 ld l, a140 ld h, 0x80 142 ld a, (OS.dragOffset_X)143 ld e, a144 ld d, 0145 xor a 146 sbc hl, de148 push hl149 150 ld de, 0x8000 + 1151 call BIOS_DCOMPR 152 jp nc, .skip_20153 ld a, 1154 jp .cont_10155 .skip_20:156 ld a, l157 .cont_10:158 ld (OS.windowCorner_TopLeft_X), a159 pop hl160 161 162 ld a, (ix + PROCESS_STRUCT_IX.width)163 add a 164 add a165 add a166 ld c, a167 ld b, 0168 or a 169 jp z, .skip_3170 add hl, bc172 173 ld de, 0x8000 + (255 + 2)174 call BIOS_DCOMPR 175 jp nc, .skip_3 176 jp .skip_4 177.skip_3:178 179 ld a, 1 180 sub c181 ld (OS.windowCorner_TopLeft_X), a182.skip_4:183 185 186 ld a, (OS.dragOffset_Y)187 ld b, a188 ld a, (OS.mouseY)189 sub b191 192 cp 191193 jp nc, .skip_1194 195 cp 6196 jp nc, .skip_2197.skip_1:198 ld a, 6199.skip_2:200 ld (OS.windowCorner_TopLeft_Y), a202 205 206 ld l, a207 ld h, 0x80 210 ld a, (ix + PROCESS_STRUCT_IX.height)211 add a 212 add a213 add a214 ld c, a215 ld b, 0217 add hl, bc219 ld de, 0x80b6 220 call BIOS_DCOMPR 221 jp c, .skip_5224 225 ld a, 191 - 9226 sub c227 ld (OS.windowCorner_TopLeft_Y), a228.skip_5:229 230 232 call _ADJUST_WINDOW_DRAG_CORNERS234 ret238_END_DRAG_WINDOW:239 240 241 xor a242 ld (OS.isDraggingWindow), a244 ld ix, (OS.currentProcessAddr)246 ld a, (OS.windowCorner_TopLeft_X)247 dec a 248 srl a 249 srl a 250 srl a 251 ld (ix + PROCESS_STRUCT_IX.x), a253 ld a, (OS.windowCorner_TopLeft_Y)254 sub 6 255 srl a 256 srl a 257 srl a 258 ld (ix + PROCESS_STRUCT_IX.y), a260 call _UPDATE_SCREEN262 ret263System/Mouse/Mouse.s6 System/Mouse/ResizeWindow.s13_START_RESIZE_WINDOW:5 6 ld a, (ix + PROCESS_STRUCT_IX.windowState)7 cp WINDOW_STATE.RESTORED8 ret nz12 13 ld a, 114 ld (OS.isResizingWindow), a17 19 21 ld a, (ix + PROCESS_STRUCT_IX.x) 23 add a 24 add a25 add a 26 inc a 27 ld (OS.windowCorner_TopLeft_X), a28 ld (OS.windowCorner_BottomLeft_X), a29 dec a 30 ld c, a 31 ld a, (ix + PROCESS_STRUCT_IX.width) 33 add a 34 add a35 add a 36 add c 37 sub 16 + 4 38 ld (OS.windowCorner_BottomRight_X), a39 ld b, a41 ld a, (OS.mouseX)43 sub b45 ld (OS.dragOffset_X), a47 48 ld a, (ix + PROCESS_STRUCT_IX.minWidth) 50 add a 51 add a52 add a 53 add c 54 sub 16 + 4 55 ld (OS.resizeWindowCorner_BottomRight_X_Min), a59 61 63 ld a, (ix + PROCESS_STRUCT_IX.y) 65 add a 66 add a67 add a 68 add 6 69 ld (OS.windowCorner_TopLeft_Y), a70 ld (OS.windowCorner_TopRight_Y), a71 sub 6 72 ld c, a 73 ld a, (ix + PROCESS_STRUCT_IX.height) 75 add a 76 add a77 add a 78 add c 79 sub 16 + 4 80 ld (OS.windowCorner_BottomRight_Y), a81 ld b, a83 ld a, (OS.mouseY)85 sub b87 ld (OS.dragOffset_Y), a90 91 ld a, (ix + PROCESS_STRUCT_IX.minHeight) 93 add a 94 add a95 add a 96 add c 97 sub 16 + 4 98 ld (OS.resizeWindowCorner_BottomRight_Y_Min), a101 103 call _ADJUST_WINDOW_RESIZE_CORNERS106 ret110111_ADJUST_WINDOW_RESIZE_CORNERS:113 ld a, (OS.windowCorner_BottomRight_X)114 ld (OS.windowCorner_TopRight_X), a116 ld a, (OS.windowCorner_BottomRight_Y)117 ld (OS.windowCorner_BottomLeft_Y), a120 121 ld a, (BIOS_JIFFY)122 and 0011 1100 b123 srl a 124 srl a 125 ld hl, DRAG_WINDOW_SPRITE_COLOR_LUT126 ld b, 0127 ld c, a128 add hl, bc129 ld a, (hl)130 ld (OS.windowCorner_TopLeft_Color), a131 ld (OS.windowCorner_BottomLeft_Color), a132 ld (OS.windowCorner_TopRight_Color), a133 ld (OS.windowCorner_BottomRight_Color), a135 ret137142_DO_RESIZE_WINDOW:144 145 ld a, (OS.dragOffset_X)146 ld b, a147 ld a, (OS.mouseX)148 sub b149 jp c, .lessThanMinWidth 150 ld (OS.windowCorner_BottomRight_X), a152 155 ld b, a 156 ld a, (OS.resizeWindowCorner_BottomRight_X_Min)157 cp b158 jp nc, .lessThanMinWidth 159 jp .cont_1160.lessThanMinWidth:161 ld a, (OS.resizeWindowCorner_BottomRight_X_Min)162 ld (OS.windowCorner_BottomRight_X), a163 jp .cont_2 164.cont_1:167 170 ld b, 256 - 16 - 4 171 ld a, (OS.windowCorner_BottomRight_X)172 cp b173 jp nc, .greaterThanMaxWidth 174 jp .cont_2175.greaterThanMaxWidth:176 ld a, 256 - 16 - 4 177 ld (OS.windowCorner_BottomRight_X), a178.cont_2:180 182 183 ld a, (OS.dragOffset_Y)184 ld b, a185 ld a, (OS.mouseY)186 sub b187 jp c, .lessThanMinHeight 188 ld (OS.windowCorner_BottomRight_Y), a190 193 ld b, a 194 ld a, (OS.resizeWindowCorner_BottomRight_Y_Min)195 cp b196 jp nc, .lessThanMinHeight 197 jp .cont_10198.lessThanMinHeight:199 ld a, (OS.resizeWindowCorner_BottomRight_Y_Min)200 ld (OS.windowCorner_BottomRight_Y), a201 jp .cont_20 202.cont_10:205 208 ld b, 192 - 16 - 16 - 4 209 ld a, (OS.windowCorner_BottomRight_Y)210 cp b211 jp nc, .greaterThanMaxHeight 212 jp .cont_20213.greaterThanMaxHeight:214 ld a, 192 - 16 - 16 - 4 215 ld (OS.windowCorner_BottomRight_Y), a216.cont_20:218 220 call _ADJUST_WINDOW_RESIZE_CORNERS222 ret225_END_RESIZE_WINDOW:226 227 228 xor a229 ld (OS.isResizingWindow), a231 ld ix, (OS.currentProcessAddr)233 234 ld a, (OS.windowCorner_BottomRight_X)235 dec a 236 add 16 + 4 237 srl a 238 srl a 239 srl a 241 ld b, (ix + PROCESS_STRUCT_IX.x)243 sub b245 inc a 246 ld (ix + PROCESS_STRUCT_IX.width), a250 251 ld a, (OS.windowCorner_BottomRight_Y)252 add 16 + 4 253 srl a 254 srl a 255 srl a 257 ld b, (ix + PROCESS_STRUCT_IX.y)259 sub b261 ld (ix + PROCESS_STRUCT_IX.height), a265 call _UPDATE_SCREEN267 ret268System/Mouse/Mouse.s10WAIT1: equ 10 11WAIT2: equ 30 141623GTMOUS:24 ld b, WAIT2 25 call GTOFS2 27 28 ld ix, 029 bit 4, a30 jp nz, .mouseButton_1_NotClicked31 ld ixh, 132.mouseButton_1_NotClicked:33 bit 5, a34 jp nz, .mouseButton_2_NotClicked35 ld ixl, 136.mouseButton_2_NotClicked:38 and 0x0F39 rlca40 rlca41 rlca42 rlca43 ld c, a44 call GTOFST 45 and 0x0F46 or c47 ld h, a 48 call GTOFST 49 and 0x0F50 rlca51 rlca52 rlca53 rlca54 ld c, a55 call GTOFST 56 and 0x0F57 or c58 ld l, a 59 ret60 61GTOFST: 62 ld b, WAIT163GTOFS2: 64 ld a, 15 66 out (0xA0), a67 in a, (0xA1) 68 and 0x80 69 or d 70 out (0xA1), a71 xor e72 ld d, a73 74 call WAITMS 75 76 ld a, 1477 out (0xA0), a78 79 in a, (0xA2)80 ret81WAITMS:82 ld a, b83WTTR:84 djnz WTTR85 db 0xED,0x55 86 rlca87 rlca88 ld b, a89WTTR2:90 djnz WTTR291 ld b, a 92WTTR3:93 djnz WTTR395 ret 97105CLIPADD:106 107 ld a, l108 ld b, e109 call LIMITADD110 ld l, a111 112 ld a, h113 ld b, d114 call LIMITADD115 ld h, a116 cp 191117 ret c118 ld h, 191119 ret120 121LIMITADD:122 123127 128 129 sub 128 130 add a, b 131 jp pe, .CLIP 132 add a, 128 133 ret 134.CLIP: 135 ld a, b 136 cpl 137 add a, a 138 sbc a, a 139 ret 143148GET_MOUSE_POSITION_IN_TILES:149 ld a, (OS.mouseY)150 152 153 srl a 154 srl a 155 srl a 156 ld h, a159 ld a, (OS.mouseX)161 162 srl a 163 srl a 164 srl a 165 ld l, a167 retSystem\Main.s24 System/Process/Process.s1 System/Process/LoadProcess.s13_LOAD_PROCESS:5 6 ld de, (OS.nextAvailableProcessAddr)7 ld a, 0xff8 cp d9 jp nz, .skip_010 cp e11 jp z, .showAlertMaxProcessLimitReached12.skip_0:14 15 push hl16 ld a, 0xff17 ld hl, (OS.nextAvailableProcessAddr)18 ld (hl), a19 20 push hl 21 pop de23 inc de25 27 ld bc, Process_struct.size - 128 ldir29 pop hl32 34 ld de, (OS.nextAvailableProcessAddr) 35 ld bc, Process_struct.size_Header 36 ldir 38 39 ld hl, (OS.nextAvailableProcessAddr)40 ld (OS.currentProcessAddr), hl44 45 ld hl, (OS.currentProcessAddr)46 call _GET_NEXT_AVAILABLE_PROCESS_ID47 ld a, ixh48 cp 25549 jp z, .maxProcessLimitReached50 ld hl, (OS.currentProcessAddr)51 ld (hl), a 53 54 call _GET_NEXT_AVAILABLE_PROCESS_ADDR55 57 ld (OS.nextAvailableProcessAddr), hl61 ld ix, (OS.currentProcessAddr)63 64 push ix 65 pop hl67 ld de, OS.process_slot_068 call BIOS_DCOMPR69 jp z, .isOnProcessSlot_071 ld de, OS.process_slot_172 call BIOS_DCOMPR73 jp z, .isOnProcessSlot_175 ld de, OS.process_slot_276 call BIOS_DCOMPR77 jp z, .isOnProcessSlot_279 ld de, OS.process_slot_380 call BIOS_DCOMPR81 jp z, .isOnProcessSlot_383 jp .cont_100185.isOnProcessSlot_0:86 ld hl, OS.processesVariablesArea_087 ld a, TILE_BASE_INDEX_PROCESS_088 jp .saveRamStartAddr90.isOnProcessSlot_1:91 ld hl, OS.processesVariablesArea_192 ld a, TILE_BASE_INDEX_PROCESS_193 jp .saveRamStartAddr95.isOnProcessSlot_2:96 ld hl, OS.processesVariablesArea_297 ld a, TILE_BASE_INDEX_PROCESS_298 jp .saveRamStartAddr100.isOnProcessSlot_3:101 ld hl, OS.processesVariablesArea_3102 ld a, TILE_BASE_INDEX_PROCESS_3103 105.saveRamStartAddr:106 ld (ix + PROCESS_STRUCT_IX.ramStartAddr), l107 ld (ix + PROCESS_STRUCT_IX.ramStartAddr + 1), h108 ld (ix + PROCESS_STRUCT_IX.vramStartTile), a110.cont_1001:112 113 call _GET_NUMBER_OF_PROCESSES_OPENED114 dec a115 ld (ix + PROCESS_STRUCT_IX.layer), a117 ld a, WINDOW_STATE.RESTORED118 ld (ix + PROCESS_STRUCT_IX.previousWindowState), a120 122 ld a, (OS.nextWindow_x)123 124 ld b, (ix + PROCESS_STRUCT_IX.width)125 add b126 cp 32 + 1127 jp nc, .fixWidth128 ld a, (OS.nextWindow_x)129 jp .cont_200130.fixWidth:131 xor a132.cont_200:133 ld (ix + PROCESS_STRUCT_IX.x), a134 add 2135 ld (OS.nextWindow_x), a137 ld a, (OS.nextWindow_y)138 139 ld b, (ix + PROCESS_STRUCT_IX.height)140 add b141 cp 22 + 1142 jp nc, .fixHeight143 ld a, (OS.nextWindow_y)144 jp .cont_100145.fixHeight:146 xor a147.cont_100:148 ld (ix + PROCESS_STRUCT_IX.y), a149 add 2150 ld (OS.nextWindow_y), a151 cp 8152 call nc, .resetNextWindow_XY 155 156 ld l, (ix + PROCESS_STRUCT_IX.ramStartAddr)157 ld h, (ix + PROCESS_STRUCT_IX.ramStartAddr + 1)159 push hl 160 pop iy162 164 ld ix, (OS.currentProcessAddr)165 ld e, (ix + PROCESS_STRUCT_IX.openAddr) 166 ld d, (ix + PROCESS_STRUCT_IX.openAddr + 1) 167 call JP_DE171 call _UPDATE_SCREEN174 call _DRAW_TASKBAR178 184 185 186 193 ret195.maxProcessLimitReached:196 197 ld hl, 0xffff198 ld (OS.nextAvailableProcessAddr), hl200 ret202.showAlertMaxProcessLimitReached:204 208 ret210.resetNextWindow_XY:211 xor a212 ld (OS.nextWindow_x), a213 ld (OS.nextWindow_y), a215 ret217System/Process/Process.s2 System/Process/SetCurrentProcess.s13_SET_CURRENT_PROCESS:5 8 9 ld (OS.currentProcessAddr), hl11 push hl 12 pop ix14 push hl15 16 ld l, (ix + PROCESS_STRUCT_IX.ramStartAddr)17 ld h, (ix + PROCESS_STRUCT_IX.ramStartAddr + 1)19 push hl 20 pop iy24 25 ld e, (ix + PROCESS_STRUCT_IX.getFocusAddr) 26 ld d, (ix + PROCESS_STRUCT_IX.getFocusAddr + 1) 27 call JP_DE28 pop hl 30 push hl31 32 ld c, (ix + PROCESS_STRUCT_IX.layer)33 34 35 call _ADJUST_LAYER_OF_PROCESSES37 38 call _GET_NUMBER_OF_PROCESSES_OPENED39 dec a40 ld (ix + PROCESS_STRUCT_IX.layer), a41 pop hl43 call _UPDATE_SCREEN45 call _DRAW_TASKBAR47 52 55 ret59System/Process/Process.s3 System/Process/CloseProcess.s13_CLOSE_PROCESS:5 6 push hl7 pop ix9 10 push hl12 13 ld l, (ix + PROCESS_STRUCT_IX.ramStartAddr)14 ld h, (ix + PROCESS_STRUCT_IX.ramStartAddr + 1)16 push hl 17 pop iy20 ld e, (ix + PROCESS_STRUCT_IX.closeAddr) 21 ld d, (ix + PROCESS_STRUCT_IX.closeAddr + 1) 22 call JP_DE23 pop hl25 26 push hl27 ld c, (ix + PROCESS_STRUCT_IX.layer)28 call _ADJUST_LAYER_OF_PROCESSES29 pop hl32 push hl33 call _CLOSE_WINDOW34 pop hl39 40 push hl41 xor a42 ld (iy + 0), a43 44 push iy 45 pop hl46 47 push hl48 inc hl 49 push hl50 pop de51 pop hl52 53 ld bc, OS.PROCESS_VARS_AREA_SIZE - 154 ldir55 pop hl58 push hl59 60 ld a, 0xff61 62 ld (hl), a63 64 push hl 65 pop de67 inc de69 71 ld bc, Process_struct.size - 173 ldir74 75 pop hl79 call _DISABLE_MOUSE_OVER80 85 88 92 95 101 call _UPDATE_SCREEN104 call _DRAW_TASKBAR106 107 call _GET_NEXT_AVAILABLE_PROCESS_ADDR108 ld (OS.nextAvailableProcessAddr), hl112 113 ld hl, 0x0000114 ld (OS.currentProcessAddr), hl118 ret119System/Process/Process.s4 System/Process/MinimizeProcess.s13_MINIMIZE_PROCESS:5 6 push hl7 pop ix9 10 ld a, (ix + PROCESS_STRUCT_IX.windowState)11 cp WINDOW_STATE.MINIMIZED12 ret z14 15 ld (ix + PROCESS_STRUCT_IX.previousWindowState), a17 18 ld a, WINDOW_STATE.MINIMIZED19 ld (ix + PROCESS_STRUCT_IX.windowState), a21 push ix23 24 ld hl, (OS.currentProcessAddr)25 push ix 26 pop de27 call BIOS_DCOMPR 28 jp nz, .skip_130 ld hl, 0x000031 ld (OS.currentProcessAddr), hl32 .skip_1:34 pop ix36 call _CLOSE_WINDOW38 call _UPDATE_SCREEN40 call _DISABLE_MOUSE_OVER41 46 49 53 56 61 call _DRAW_TASKBAR 64 retSystem/Process/Process.s5 System/Process/MaximizeProcess.s13_MAXIMIZE_PROCESS:5 6 push hl7 pop ix9 12 13 ld a, WINDOW_STATE.MAXIMIZED14 ld (ix + PROCESS_STRUCT_IX.windowState), a16 call _SET_CURRENT_PROCESS18 20 call _DISABLE_MOUSE_OVER22 24 retSystem/Process/Process.s6 System/Process/RestoreProcess.s13_RESTORE_PROCESS:5 6 push hl7 pop ix9 10 ld a, WINDOW_STATE.RESTORED11 ld (ix + PROCESS_STRUCT_IX.windowState), a13 call _SET_CURRENT_PROCESS15 call _DISABLE_MOUSE_OVER17 retSystem/Process/Process.s7 System/Process/MinimizeAllProcesses.s1_MINIMIZE_ALL_PROCESSES:3 4 ld hl, OS.processes5 ld de, Process_struct.size6 ld b, MAX_PROCESS_ID + 17.loop_1:8 ld a, (hl)9 cp 0xff 10 jp z, .next_112 push hl, de, bc13 ld c, a14 call _GET_PROCESS_BY_ID16 call _MINIMIZE_PROCESS17 pop bc, de, hl19.next_1:20 add hl, de21 djnz .loop_123 retSystem/Process/Process.s11MAX_PROCESS_ID: equ 3 1518_GET_NEXT_AVAILABLE_PROCESS_ID:19 ld ixh, 0 21.outerLoop:22 ld hl, OS.processes24.loop:25 ld a, (hl)26 cp ixh27 jp z, .goToNext 29 ld bc, Process_struct.size30 add hl, bc 32 33 ld de, OS.processes_end34 call BIOS_DCOMPR 35 jp nz, .loop37 38 ret40.goToNext:41 inc ixh42 ld a, ixh43 cp MAX_PROCESS_ID + 144 jp nz, .outerLoop46 47 ld ixh, 25549 ret5255_GET_NEXT_AVAILABLE_PROCESS_ADDR:57 ld hl, OS.processes58 ld de, Process_struct.size59 ld b, MAX_PROCESS_ID + 160.loop:61 ld a, (hl)62 63 inc a 64 ret z66 add hl, de68 djnz .loop70 71 ld hl, 0xffff73 ret7780_GET_NUMBER_OF_PROCESSES_OPENED:82 ld hl, OS.processes83 ld de, Process_struct.size84 ld b, MAX_PROCESS_ID + 185 xor a 86.loop:87 ld c, (hl)88 89 inc c 90 jp z, .next92 93 inc a95.next:96 add hl, de98 djnz .loop100 ret104110_GET_PROCESS_BY_ID:111 112 ld hl, OS.processes113 ld de, Process_struct.size114 ld b, MAX_PROCESS_ID + 1115.loop_1:116 ld a, (hl)117 cp c118 ret z119 add hl, de120 djnz .loop_1122 123 ld hl, 0x0000124 xor a 126 ret129131135139146151153158163168171_ADJUST_LAYER_OF_PROCESSES:173 ld hl, OS.processes + PROCESS_STRUCT_IX.layer174 ld de, Process_struct.size175 ld b, MAX_PROCESS_ID + 1176.loop:177 ld a, (hl)178 cp 0xff179 jp z, .next 181 cp c182 jp c, .next 184 185 dec a186 ld (hl), a188.next:189 add hl, de191 djnz .loop193 ret195System\Main.s25 System/Time/Time.s1_INIT_SYSTEM_TIME:3 xor a5 ld (os.timeCounter), a7 8 ld a, 0x129 ld (OS.currentTime_Hours), a10 xor a11 ld (OS.currentTime_Minutes), a12 ld (OS.currentTime_Seconds), a13 ld (OS.timeCounter), a15 16 ld hl, OS.currentDate17 ld (hl), a18 inc hl19 ld (hl), a20 inc hl21 ld (hl), a23 ret27SYSTEM_HERTZ_RATE: equ 60 29_UPDATE_SYSTEM_TIME:31 ld a, (os.timeCounter)32 inc a33 ld (os.timeCounter), a34 cp SYSTEM_HERTZ_RATE35 ret nz37 38 xor a39 ld (os.timeCounter), a41 43 44 ld a, (OS.currentTime_Seconds)45 inc a 46 daa47 ld (OS.currentTime_Seconds), a49 50 cp 0x6051 ret nz52 ld a, (OS.currentTime_Minutes)53 inc a 54 daa55 ld (OS.currentTime_Minutes), a56 57 xor a58 ld (OS.currentTime_Seconds), a60 61 ld a, (OS.currentTime_Minutes)62 cp 0x6063 ret nz64 ld a, (OS.currentTime_Hours)65 inc a66 daa68 cp 0x13 69 jp nz, .not13Hours70 ld a, 0x0171.not13Hours:72 ld (OS.currentTime_Hours), a73 74 xor a75 ld (OS.currentTime_Minutes), a79 retSystem\Main.s26System_Code_Size: equ $ - System_Code_Start 2930Assets_Start:31 32 Graphics/Tiles.s1TILE_PATTERNS:35TILE_EMPTY: equ 06 DB 00000000b7 DB 00000000b8 DB 00000000b9 DB 00000000b10 DB 00000000b11 DB 00000000b12 DB 00000000b13 DB 00000000b15TILE_WINDOW_TITLE_TOP_LEFT: equ 116 DB 00000000b17 DB 00000000b18 DB 00000000b19 DB 00000000b20 DB 00000000b21 DB 00000000b22 DB 01111111b23 DB 01111111b25TILE_WINDOW_TITLE_BOTTOM_LEFT: equ 226 DB 01111111b27 DB 01111111b28 DB 01111111b29 DB 01111111b30 DB 01111111b31 DB 01111111b32 DB 01111111b33 DB 01111111b35TILE_WINDOW_TITLE_MIDDLE_TOP: equ 336 DB 00000000b37 DB 00000000b38 DB 00000000b39 DB 00000000b40 DB 00000000b41 DB 00000000b42 DB 11111111b43 DB 11111111b45TILE_EMPTY_BLACK: equ 446TILE_WINDOW_TITLE_MIDDLE_BOTTOM: equ 447 DB 11111111b48 DB 11111111b49 DB 11111111b50 DB 11111111b51 DB 11111111b52 DB 11111111b53 DB 11111111b54 DB 11111111b56TILE_WINDOW_BORDER_LEFT: equ 557 DB 01000000b58 DB 01000000b59 DB 01000000b60 DB 01000000b61 DB 01000000b62 DB 01000000b63 DB 01000000b64 DB 01000000b66TILE_WINDOW_BORDER_BOTTOM_LEFT: equ 667 DB 01000000b68 DB 01000000b69 DB 01000000b70 DB 01111111b71 DB 00001111b72 DB 00001111b73 DB 00001111b74 DB 00000000b76TILE_WINDOW_BORDER_MIDDLE_BOTTOM: equ 777 DB 00000000b78 DB 00000000b79 DB 00000000b80 DB 11111111b81 DB 11111111b82 DB 11111111b83 DB 11111111b84 DB 00000000b86TILE_WINDOW_RESIZE_CORNER_LEFT: equ 887 DB 00000001b88 DB 00000011b89 DB 00000110b90 DB 11111111b91 DB 11111111b92 DB 11111111b93 DB 11111111b94 DB 00000000b96TILE_WINDOW_RESIZE_CORNER_TOP: equ 997 DB 00011110b98 DB 00011110b99 DB 00011110b100 DB 00011110b101 DB 00011110b102 DB 00111110b103 DB 01111110b104 DB 11011110b106TILE_WINDOW_RESIZE_CORNER_RIGHT: equ 10107 DB 10111110b108 DB 01111110b109 DB 11011110b110 DB 11111110b111 DB 11111110b112 DB 11111110b113 DB 11111110b114 DB 00000000b117TILE_WINDOW_MINIMIZE_BUTTON_PATTERN:118TILE_WINDOW_MINIMIZE_BUTTON: equ 11119 DB 11111111b120 DB 11111111b121 DB 11111111b122 DB 11111111b123 DB 11000001b124 DB 11000001b125 DB 11111111b126 DB 11111111b128TILE_WINDOW_MAXIMIZE_BUTTON_PATTERN:129TILE_WINDOW_MAXIMIZE_BUTTON: equ 12130 DB 11111111b131 DB 11000001b132 DB 11000001b133 DB 11011101b134 DB 11011101b135 DB 11000001b136 DB 11111111b137 DB 11111111b139TILE_WINDOW_CLOSE_BUTTON_PATTERN:140TILE_WINDOW_CLOSE_BUTTON: equ 13141 DB 11111111b142 DB 11011101b143 DB 11101011b144 DB 11110111b145 DB 11101011b146 DB 11011101b147 DB 11111111b148 DB 11111111b149 150TILE_WINDOW_TOP_RIGHT_CORNER_TOP: equ 14151 DB 00000000b152 DB 00000000b153 DB 00000000b154 DB 00000000b155 DB 00000000b156 DB 00000000b157 DB 11110000b158 DB 11110000b160TILE_WINDOW_TOP_RIGHT_CORNER_BOTTOM: equ 15161 DB 11110000b162 DB 11111110b163 DB 11111110b164 DB 11111110b165 DB 11111110b166 DB 11111110b167 DB 11111110b168 DB 11111110b170TILE_WINDOW_BORDER_RIGHT: equ 16171 DB 00011110b172 DB 00011110b173 DB 00011110b174 DB 00011110b175 DB 00011110b176 DB 00011110b177 DB 00011110b178 DB 00011110b180190192TILE_TASKBAR_TOP: equ 17193 DB 00000000 b194 DB 00000000 b195 DB 00000000 b196 DB 00000000 b197 DB 00000000 b198 DB 00000000 b199 DB 11111111 b200 DB 11111111 b202TILE_HOME_ICON: equ 18203 DB 11100111 b204 DB 11011011 b205 DB 10111101 b206 DB 01100110 b207 DB 11000011 b208 DB 10000001 b209 DB 10011001 b210 DB 10011001 b212TILE_SHOW_DESKTOP_ICON: equ 19213 DB 10011001 b214 DB 10111101 b215 DB 11111111 b216 DB 11111111 b217 DB 11111111 b218 DB 10111101 b219 DB 10011001 b220 DB 11111111 b222224TILE_LINE_TOP_LEFT: equ 20225 DB 00000000 b226 DB 00000000 b227 DB 00000000 b228 DB 00011111 b229 DB 00010000 b230 DB 00010000 b231 DB 00010000 b232 DB 00010000 b234TILE_LINE_TOP_RIGHT: equ 21235 DB 00000000 b236 DB 00000000 b237 DB 00000000 b238 DB 11110000 b239 DB 00010000 b240 DB 00010000 b241 DB 00010000 b242 DB 00010000 b244TILE_LINE_MID_RIGHT: equ 22245 DB 00010000 b246 DB 00010000 b247 DB 00010000 b248 DB 11110000 b249 DB 00010000 b250 DB 00010000 b251 DB 00010000 b252 DB 00010000 b254TILE_LINE_BOTTOM_RIGHT: equ 23255 DB 00010000 b256 DB 00010000 b257 DB 00010000 b258 DB 11110000 b259 DB 00000000 b260 DB 00000000 b261 DB 00000000 b262 DB 00000000 b264TILE_LINE_BOTTOM_LEFT: equ 24265 DB 00010000 b266 DB 00010000 b267 DB 00010000 b268 DB 00011111 b269 DB 00000000 b270 DB 00000000 b271 DB 00000000 b272 DB 00000000 b274TILE_LINE_BOTTOM_MID: equ 25275 DB 00010000 b276 DB 00010000 b277 DB 00010000 b278 DB 11111111 b279 DB 00000000 b280 DB 00000000 b281 DB 00000000 b282 DB 00000000 b284TILE_LINE_TOP_MID: equ 26285 DB 00000000 b286 DB 00000000 b287 DB 00000000 b288 DB 11111111 b289 DB 00010000 b290 DB 00010000 b291 DB 00010000 b292 DB 00010000 b294TILE_LINE_MID_LEFT: equ 27295 DB 00010000 b296 DB 00010000 b297 DB 00010000 b298 DB 00011111 b299 DB 00010000 b300 DB 00010000 b301 DB 00010000 b302 DB 00010000 b304TILE_LINE_VERTICAL: equ 28305 DB 00010000 b306 DB 00010000 b307 DB 00010000 b308 DB 00010000 b309 DB 00010000 b310 DB 00010000 b311 DB 00010000 b312 DB 00010000 b314TILE_LINE_MID_BOTTOM: equ 29315 DB 00010000 b316 DB 00010000 b317 DB 00010000 b318 DB 11111111 b319 DB 00000000 b320 DB 00000000 b321 DB 00000000 b322 DB 00000000 b324TILE_LINE_HORIZONTAL: equ 30325 DB 00000000 b326 DB 00000000 b327 DB 00000000 b328 DB 11111111 b329 DB 00000000 b330 DB 00000000 b331 DB 00000000 b332 DB 00000000 b334TILE_LINE_CROSS: equ 31335 DB 00010000 b336 DB 00010000 b337 DB 00010000 b338 DB 11111111 b339 DB 00010000 b340 DB 00010000 b341 DB 00010000 b342 DB 00010000 b344TILE_LINE_BOTTOM_RIGHT_SHADOW: equ 32345 DB 00011110 b346 DB 00011110 b347 DB 00011110 b348 DB 11111110 b349 DB 11111110 b350 DB 11111110 b351 DB 11111110 b352 DB 00000000 b354TILE_ARROW_UP: equ 33355 DB 00000000b356 DB 00000000b357 DB 00001000b358 DB 00011100b359 DB 00111110b360 DB 00000000b361 DB 00000000b362 DB 00000000b364TILE_ARROW_DOWN: equ 34365 DB 00000000b366 DB 00000000b367 DB 00000000b368 DB 00111110b369 DB 00011100b370 DB 00001000b371 DB 00000000b372 DB 00000000b374TILE_DOTS_VERTICAL: equ 35375 DB 00000000b376 DB 00001000b377 DB 00000000b378 DB 00000000b379 DB 00000000b380 DB 00001000b381 DB 00000000b382 DB 00000000b384TILE_ARROW_RIGHT: equ 36385 DB 00000000b386 DB 00000000b387 DB 00010000b388 DB 00011000b389 DB 00011100b390 DB 00011000b391 DB 00010000b392 DB 00000000b394TILE_ARROW_LEFT: equ 37395 DB 00000000b396 DB 00000000b397 DB 00001000b398 DB 00011000b399 DB 00111000b400 DB 00011000b401 DB 00001000b402 DB 00000000b404TILE_DOTS_HORIZONTAL: equ 38405 DB 00000000b406 DB 00000000b407 DB 00000000b408 DB 00000000b409 DB 00100010b410 DB 00000000b411 DB 00000000b412 DB 00000000b414 423TILE_CHECKBOX_UNCHECKED: equ 39424 DB 11111110 b425 DB 10000010 b426 DB 10000010 b427 DB 10000010 b428 DB 10000010 b429 DB 10000010 b430 DB 11111110 b431 DB 00000000 b433TILE_CHECKBOX_CHECKED: equ 40434 DB 11111110 b435 DB 11111010 b436 DB 11111010 b437 DB 10110110 b438 DB 11010110 b439 DB 11101110 b440 DB 11111110 b441 DB 00000000 b443445BASE_INDEX_TILE_FONT: equ 41447TILE_FONT_REVERSED_PATTERNS:449451TILE_FONT_REVERSED_NUMBERS_PATTERNS:453TILE_FONT_REVERSED_NUMBERS_0: equ BASE_INDEX_TILE_FONT + 0455 456 db 00000000 b457 db 00111100 b458 db 01100110 b459 db 01101110 b460 db 01110110 b461 db 01100110 b462 db 00111100 b463 db 00000000 b464 465 db 00000000 b466 db 00011000 b467 db 00111000 b468 db 00011000 b469 db 00011000 b470 db 00011000 b471 db 01111110 b472 db 00000000 b473 474 db 00000000 b475 db 00111100 b476 db 01100110 b477 db 00001100 b478 db 00011000 b479 db 00110000 b480 db 01111110 b481 db 00000000 b482 483 db 00000000 b484 db 01111110 b485 db 00001100 b486 db 00011000 b487 db 00001100 b488 db 01100110 b489 db 00111100 b490 db 00000000 b491 492 db 00000000 b493 db 00001100 b494 db 00011100 b495 db 00111100 b496 db 01101100 b497 db 01111110 b498 db 00001100 b499 db 00000000 b500 501 db 00000000 b502 db 01111110 b503 db 01100000 b504 db 01111100 b505 db 00000110 b506 db 01100110 b507 db 00111100 b508 db 00000000 b509 510 db 00000000 b511 db 00111100 b512 db 01100000 b513 db 01111100 b514 db 01100110 b515 db 01100110 b516 db 00111100 b517 db 00000000 b518 519 db 00000000 b520 db 01111110 b521 db 00000110 b522 db 00001100 b523 db 00011000 b524 db 00110000 b525 db 00110000 b526 db 00000000 b527 528 db 00000000 b529 db 00111100 b530 db 01100110 b531 db 00111100 b532 db 01100110 b533 db 01100110 b534 db 00111100 b535 db 00000000 b536 537 db 00000000 b538 db 00111100 b539 db 01100110 b540 db 00111110 b541 db 00000110 b542 db 00001100 b543 db 00111000 b544 db 00000000 b547550TILE_FONT_REVERSED_LOWERCASE_PATTERNS:552TILE_FONT_REVERSED_LOWERCASE_A: equ TILE_FONT_REVERSED_NUMBERS_0 + 10554TILE_FONT_REVERSED_LOWERCASE_B: equ TILE_FONT_REVERSED_LOWERCASE_A + 1555TILE_FONT_REVERSED_LOWERCASE_C: equ TILE_FONT_REVERSED_LOWERCASE_A + 2556TILE_FONT_REVERSED_LOWERCASE_D: equ TILE_FONT_REVERSED_LOWERCASE_A + 3557TILE_FONT_REVERSED_LOWERCASE_E: equ TILE_FONT_REVERSED_LOWERCASE_A + 4558TILE_FONT_REVERSED_LOWERCASE_F: equ TILE_FONT_REVERSED_LOWERCASE_A + 5559TILE_FONT_REVERSED_LOWERCASE_G: equ TILE_FONT_REVERSED_LOWERCASE_A + 6560TILE_FONT_REVERSED_LOWERCASE_H: equ TILE_FONT_REVERSED_LOWERCASE_A + 7561TILE_FONT_REVERSED_LOWERCASE_I: equ TILE_FONT_REVERSED_LOWERCASE_A + 8562TILE_FONT_REVERSED_LOWERCASE_J: equ TILE_FONT_REVERSED_LOWERCASE_A + 9563TILE_FONT_REVERSED_LOWERCASE_K: equ TILE_FONT_REVERSED_LOWERCASE_A + 10564TILE_FONT_REVERSED_LOWERCASE_L: equ TILE_FONT_REVERSED_LOWERCASE_A + 11565TILE_FONT_REVERSED_LOWERCASE_M: equ TILE_FONT_REVERSED_LOWERCASE_A + 12566TILE_FONT_REVERSED_LOWERCASE_N: equ TILE_FONT_REVERSED_LOWERCASE_A + 13567TILE_FONT_REVERSED_LOWERCASE_O: equ TILE_FONT_REVERSED_LOWERCASE_A + 14568TILE_FONT_REVERSED_LOWERCASE_P: equ TILE_FONT_REVERSED_LOWERCASE_A + 15569TILE_FONT_REVERSED_LOWERCASE_Q: equ TILE_FONT_REVERSED_LOWERCASE_A + 16570TILE_FONT_REVERSED_LOWERCASE_R: equ TILE_FONT_REVERSED_LOWERCASE_A + 17571TILE_FONT_REVERSED_LOWERCASE_S: equ TILE_FONT_REVERSED_LOWERCASE_A + 18572TILE_FONT_REVERSED_LOWERCASE_T: equ TILE_FONT_REVERSED_LOWERCASE_A + 19573TILE_FONT_REVERSED_LOWERCASE_U: equ TILE_FONT_REVERSED_LOWERCASE_A + 20574TILE_FONT_REVERSED_LOWERCASE_V: equ TILE_FONT_REVERSED_LOWERCASE_A + 21575TILE_FONT_REVERSED_LOWERCASE_W: equ TILE_FONT_REVERSED_LOWERCASE_A + 22576TILE_FONT_REVERSED_LOWERCASE_X: equ TILE_FONT_REVERSED_LOWERCASE_A + 23577TILE_FONT_REVERSED_LOWERCASE_Y: equ TILE_FONT_REVERSED_LOWERCASE_A + 24578TILE_FONT_REVERSED_LOWERCASE_Z: equ TILE_FONT_REVERSED_LOWERCASE_A + 25580 581 db 00000000 b582 db 00000000 b583 db 00111100 b584 db 00000110 b585 db 00111110 b586 db 01100110 b587 db 00111110 b588 db 00000000 b589 590 db 00000000 b591 db 01100000 b592 db 01100000 b593 db 01111100 b594 db 01100110 b595 db 01100110 b596 db 01111100 b597 db 00000000 b598 599 db 00000000 b600 db 00000000 b601 db 00111100 b602 db 01100000 b603 db 01100000 b604 db 01100000 b605 db 00111100 b606 db 00000000 b607 608 db 00000000 b609 db 00000110 b610 db 00000110 b611 db 00111110 b612 db 01100110 b613 db 01100110 b614 db 00111110 b615 db 00000000 b616 617 db 00000000 b618 db 00000000 b619 db 00111100 b620 db 01100110 b621 db 01111110 b622 db 01100000 b623 db 00111100 b624 db 00000000 b625 626 db 00000000 b627 db 00001110 b628 db 00011000 b629 db 00111110 b630 db 00011000 b631 db 00011000 b632 db 00011000 b633 db 00000000 b634 635 db 00000000 b636 db 00000000 b637 db 00111110 b638 db 01100110 b639 db 01100110 b640 db 00111110 b641 db 00000110 b642 db 01111100 b643 644 db 00000000 b645 db 01100000 b646 db 01100000 b647 db 01111100 b648 db 01100110 b649 db 01100110 b650 db 01100110 b651 db 00000000 b652 653 db 00000000 b654 db 00011000 b655 db 00000000 b656 db 00111000 b657 db 00011000 b658 db 00011000 b659 db 00111100 b660 db 00000000 b661 662 db 00000000 b663 db 00000110 b664 db 00000000 b665 db 00000110 b666 db 00000110 b667 db 00000110 b668 db 00000110 b669 db 00111100 b670 671 db 00000000 b672 db 01100000 b673 db 01100000 b674 db 01101100 b675 db 01111000 b676 db 01101100 b677 db 01100110 b678 db 00000000 b679 680 db 00000000 b681 db 00111000 b682 db 00011000 b683 db 00011000 b684 db 00011000 b685 db 00011000 b686 db 00111100 b687 db 00000000 b688 689 db 00000000 b690 db 00000000 b691 db 01100110 b692 db 01111111 b693 db 01111111 b694 db 01101011 b695 db 01100011 b696 db 00000000 b697 698 db 00000000 b699 db 00000000 b700 db 01111100 b701 db 01100110 b702 db 01100110 b703 db 01100110 b704 db 01100110 b705 db 00000000 b706 707 db 00000000 b708 db 00000000 b709 db 00111100 b710 db 01100110 b711 db 01100110 b712 db 01100110 b713 db 00111100 b714 db 00000000 b715 716 db 00000000 b717 db 00000000 b718 db 01111100 b719 db 01100110 b720 db 01100110 b721 db 01111100 b722 db 01100000 b723 db 01100000 b724 725 db 00000000 b726 db 00000000 b727 db 00111110 b728 db 01100110 b729 db 01100110 b730 db 00111110 b731 db 00000110 b732 db 00000110 b733 734 db 00000000 b735 db 00000000 b736 db 01111100 b737 db 01100110 b738 db 01100000 b739 db 01100000 b740 db 01100000 b741 db 00000000 b742 743 db 00000000 b744 db 00000000 b745 db 00111110 b746 db 01100000 b747 db 00111100 b748 db 00000110 b749 db 01111100 b750 db 00000000 b751 752 db 00000000 b753 db 00011000 b754 db 01111110 b755 db 00011000 b756 db 00011000 b757 db 00011000 b758 db 00001110 b759 db 00000000 b760 761 db 00000000 b762 db 00000000 b763 db 01100110 b764 db 01100110 b765 db 01100110 b766 db 01100110 b767 db 00111110 b768 db 00000000 b769 770 db 00000000 b771 db 00000000 b772 db 01100110 b773 db 01100110 b774 db 01100110 b775 db 00111100 b776 db 00011000 b777 db 00000000 b778 779 db 00000000 b780 db 00000000 b781 db 01100011 b782 db 01101011 b783 db 01111111 b784 db 00111110 b785 db 00110110 b786 db 00000000 b787 788 db 00000000 b789 db 00000000 b790 db 01100110 b791 db 00111100 b792 db 00011000 b793 db 00111100 b794 db 01100110 b795 db 00000000 b796 797 db 00000000 b798 db 00000000 b799 db 01100110 b800 db 01100110 b801 db 01100110 b802 db 00111110 b803 db 00001100 b804 db 01111000 b805 806 db 00000000 b807 db 00000000 b808 db 01111110 b809 db 00001100 b810 db 00011000 b811 db 00110000 b812 db 01111110 b813 db 00000000 b815TILE_FONT_REVERSED_LOWERCASE_PATTERNS.size: equ $ - TILE_FONT_REVERSED_LOWERCASE_PATTERNS818820TILE_FONT_REVERSED_SYMBOLS_PATTERNS:822TILE_FONT_REVERSED_SYMBOLS: equ TILE_FONT_REVERSED_LOWERCASE_A + 26824 825 db 00000000 b826 db 00000000 b827 db 00011000 b828 db 00011000 b829 db 00000000 b830 db 00011000 b831 db 00011000 b832 db 00000000 b834837TILE_FONT_REVERSED_PATTERNS.SIZE: equ $ - TILE_FONT_REVERSED_PATTERNS840842844TILE_FONT_NUMBERS_PATTERNS:846TILE_FONT_NUMBERS_0: equ TILE_FONT_REVERSED_SYMBOLS + 1848 849 db 00000000 b850 db 00111100 b851 db 01100110 b852 db 01101110 b853 db 01110110 b854 db 01100110 b855 db 00111100 b856 db 00000000 b857 858 db 00000000 b859 db 00011000 b860 db 00111000 b861 db 00011000 b862 db 00011000 b863 db 00011000 b864 db 01111110 b865 db 00000000 b866 867 db 00000000 b868 db 00111100 b869 db 01100110 b870 db 00001100 b871 db 00011000 b872 db 00110000 b873 db 01111110 b874 db 00000000 b875 876 db 00000000 b877 db 01111110 b878 db 00001100 b879 db 00011000 b880 db 00001100 b881 db 01100110 b882 db 00111100 b883 db 00000000 b884 885 db 00000000 b886 db 00001100 b887 db 00011100 b888 db 00111100 b889 db 01101100 b890 db 01111110 b891 db 00001100 b892 db 00000000 b893 894 db 00000000 b895 db 01111110 b896 db 01100000 b897 db 01111100 b898 db 00000110 b899 db 01100110 b900 db 00111100 b901 db 00000000 b902 903 db 00000000 b904 db 00111100 b905 db 01100000 b906 db 01111100 b907 db 01100110 b908 db 01100110 b909 db 00111100 b910 db 00000000 b911 912 db 00000000 b913 db 01111110 b914 db 00000110 b915 db 00001100 b916 db 00011000 b917 db 00110000 b918 db 00110000 b919 db 00000000 b920 921 db 00000000 b922 db 00111100 b923 db 01100110 b924 db 00111100 b925 db 01100110 b926 db 01100110 b927 db 00111100 b928 db 00000000 b929 930 db 00000000 b931 db 00111100 b932 db 01100110 b933 db 00111110 b934 db 00000110 b935 db 00001100 b936 db 00111000 b937 db 00000000 b941944TILE_FONT_LOWERCASE_PATTERNS:946TILE_FONT_LOWERCASE_A: equ TILE_FONT_NUMBERS_0 + 10948TILE_FONT_LOWERCASE_B: equ TILE_FONT_LOWERCASE_A + 1949TILE_FONT_LOWERCASE_C: equ TILE_FONT_LOWERCASE_A + 2950TILE_FONT_LOWERCASE_D: equ TILE_FONT_LOWERCASE_A + 3951TILE_FONT_LOWERCASE_E: equ TILE_FONT_LOWERCASE_A + 4952TILE_FONT_LOWERCASE_F: equ TILE_FONT_LOWERCASE_A + 5953TILE_FONT_LOWERCASE_G: equ TILE_FONT_LOWERCASE_A + 6954TILE_FONT_LOWERCASE_H: equ TILE_FONT_LOWERCASE_A + 7955TILE_FONT_LOWERCASE_I: equ TILE_FONT_LOWERCASE_A + 8956TILE_FONT_LOWERCASE_J: equ TILE_FONT_LOWERCASE_A + 9957TILE_FONT_LOWERCASE_K: equ TILE_FONT_LOWERCASE_A + 10958TILE_FONT_LOWERCASE_L: equ TILE_FONT_LOWERCASE_A + 11959TILE_FONT_LOWERCASE_M: equ TILE_FONT_LOWERCASE_A + 12960TILE_FONT_LOWERCASE_N: equ TILE_FONT_LOWERCASE_A + 13961TILE_FONT_LOWERCASE_O: equ TILE_FONT_LOWERCASE_A + 14962TILE_FONT_LOWERCASE_P: equ TILE_FONT_LOWERCASE_A + 15963TILE_FONT_LOWERCASE_Q: equ TILE_FONT_LOWERCASE_A + 16964TILE_FONT_LOWERCASE_R: equ TILE_FONT_LOWERCASE_A + 17965TILE_FONT_LOWERCASE_S: equ TILE_FONT_LOWERCASE_A + 18966TILE_FONT_LOWERCASE_T: equ TILE_FONT_LOWERCASE_A + 19967TILE_FONT_LOWERCASE_U: equ TILE_FONT_LOWERCASE_A + 20968TILE_FONT_LOWERCASE_V: equ TILE_FONT_LOWERCASE_A + 21969TILE_FONT_LOWERCASE_W: equ TILE_FONT_LOWERCASE_A + 22970TILE_FONT_LOWERCASE_X: equ TILE_FONT_LOWERCASE_A + 23971TILE_FONT_LOWERCASE_Y: equ TILE_FONT_LOWERCASE_A + 24972TILE_FONT_LOWERCASE_Z: equ TILE_FONT_LOWERCASE_A + 25974 975 db 00000000 b976 db 00000000 b977 db 00111100 b978 db 00000110 b979 db 00111110 b980 db 01100110 b981 db 00111110 b982 db 00000000 b983 984 db 00000000 b985 db 01100000 b986 db 01100000 b987 db 01111100 b988 db 01100110 b989 db 01100110 b990 db 01111100 b991 db 00000000 b992 993 db 00000000 b994 db 00000000 b995 db 00111100 b996 db 01100000 b997 db 01100000 b998 db 01100000 b999 db 00111100 b1000 db 00000000 b1001 1002 db 00000000 b1003 db 00000110 b1004 db 00000110 b1005 db 00111110 b1006 db 01100110 b1007 db 01100110 b1008 db 00111110 b1009 db 00000000 b1010 1011 db 00000000 b1012 db 00000000 b1013 db 00111100 b1014 db 01100110 b1015 db 01111110 b1016 db 01100000 b1017 db 00111100 b1018 db 00000000 b1019 1020 db 00000000 b1021 db 00001110 b1022 db 00011000 b1023 db 00111110 b1024 db 00011000 b1025 db 00011000 b1026 db 00011000 b1027 db 00000000 b1028 1029 db 00000000 b1030 db 00000000 b1031 db 00111110 b1032 db 01100110 b1033 db 01100110 b1034 db 00111110 b1035 db 00000110 b1036 db 01111100 b1037 1038 db 00000000 b1039 db 01100000 b1040 db 01100000 b1041 db 01111100 b1042 db 01100110 b1043 db 01100110 b1044 db 01100110 b1045 db 00000000 b1046 1047 db 00000000 b1048 db 00011000 b1049 db 00000000 b1050 db 00111000 b1051 db 00011000 b1052 db 00011000 b1053 db 00111100 b1054 db 00000000 b1055 1056 db 00000000 b1057 db 00000110 b1058 db 00000000 b1059 db 00000110 b1060 db 00000110 b1061 db 00000110 b1062 db 00000110 b1063 db 00111100 b1064 1065 db 00000000 b1066 db 01100000 b1067 db 01100000 b1068 db 01101100 b1069 db 01111000 b1070 db 01101100 b1071 db 01100110 b1072 db 00000000 b1073 1074 db 00000000 b1075 db 00111000 b1076 db 00011000 b1077 db 00011000 b1078 db 00011000 b1079 db 00011000 b1080 db 00111100 b1081 db 00000000 b1082 1083 db 00000000 b1084 db 00000000 b1085 db 01100110 b1086 db 01111111 b1087 db 01111111 b1088 db 01101011 b1089 db 01100011 b1090 db 00000000 b1091 1092 db 00000000 b1093 db 00000000 b1094 db 01111100 b1095 db 01100110 b1096 db 01100110 b1097 db 01100110 b1098 db 01100110 b1099 db 00000000 b1100 1101 db 00000000 b1102 db 00000000 b1103 db 00111100 b1104 db 01100110 b1105 db 01100110 b1106 db 01100110 b1107 db 00111100 b1108 db 00000000 b1109 1110 db 00000000 b1111 db 00000000 b1112 db 01111100 b1113 db 01100110 b1114 db 01100110 b1115 db 01111100 b1116 db 01100000 b1117 db 01100000 b1118 1119 db 00000000 b1120 db 00000000 b1121 db 00111110 b1122 db 01100110 b1123 db 01100110 b1124 db 00111110 b1125 db 00000110 b1126 db 00000110 b1127 1128 db 00000000 b1129 db 00000000 b1130 db 01111100 b1131 db 01100110 b1132 db 01100000 b1133 db 01100000 b1134 db 01100000 b1135 db 00000000 b1136 1137 db 00000000 b1138 db 00000000 b1139 db 00111110 b1140 db 01100000 b1141 db 00111100 b1142 db 00000110 b1143 db 01111100 b1144 db 00000000 b1145 1146 db 00000000 b1147 db 00011000 b1148 db 01111110 b1149 db 00011000 b1150 db 00011000 b1151 db 00011000 b1152 db 00001110 b1153 db 00000000 b1154 1155 db 00000000 b1156 db 00000000 b1157 db 01100110 b1158 db 01100110 b1159 db 01100110 b1160 db 01100110 b1161 db 00111110 b1162 db 00000000 b1163 1164 db 00000000 b1165 db 00000000 b1166 db 01100110 b1167 db 01100110 b1168 db 01100110 b1169 db 00111100 b1170 db 00011000 b1171 db 00000000 b1172 1173 db 00000000 b1174 db 00000000 b1175 db 01100011 b1176 db 01101011 b1177 db 01111111 b1178 db 00111110 b1179 db 00110110 b1180 db 00000000 b1181 1182 db 00000000 b1183 db 00000000 b1184 db 01100110 b1185 db 00111100 b1186 db 00011000 b1187 db 00111100 b1188 db 01100110 b1189 db 00000000 b1190 1191 db 00000000 b1192 db 00000000 b1193 db 01100110 b1194 db 01100110 b1195 db 01100110 b1196 db 00111110 b1197 db 00001100 b1198 db 01111000 b1199 1200 db 00000000 b1201 db 00000000 b1202 db 01111110 b1203 db 00001100 b1204 db 00011000 b1205 db 00110000 b1206 db 01111110 b1207 db 00000000 b120912111213TILE_FONT_UPPERCASE_PATTERNS:1215TILE_FONT_UPPERCASE_A: equ TILE_FONT_LOWERCASE_A + 261217TILE_FONT_UPPERCASE_B: equ TILE_FONT_UPPERCASE_A + 11218TILE_FONT_UPPERCASE_C: equ TILE_FONT_UPPERCASE_A + 21219TILE_FONT_UPPERCASE_D: equ TILE_FONT_UPPERCASE_A + 31220TILE_FONT_UPPERCASE_E: equ TILE_FONT_UPPERCASE_A + 41221TILE_FONT_UPPERCASE_F: equ TILE_FONT_UPPERCASE_A + 51222TILE_FONT_UPPERCASE_G: equ TILE_FONT_UPPERCASE_A + 61223TILE_FONT_UPPERCASE_H: equ TILE_FONT_UPPERCASE_A + 71224TILE_FONT_UPPERCASE_I: equ TILE_FONT_UPPERCASE_A + 81225TILE_FONT_UPPERCASE_J: equ TILE_FONT_UPPERCASE_A + 91226TILE_FONT_UPPERCASE_K: equ TILE_FONT_UPPERCASE_A + 101227TILE_FONT_UPPERCASE_L: equ TILE_FONT_UPPERCASE_A + 111228TILE_FONT_UPPERCASE_M: equ TILE_FONT_UPPERCASE_A + 121229TILE_FONT_UPPERCASE_N: equ TILE_FONT_UPPERCASE_A + 131230TILE_FONT_UPPERCASE_O: equ TILE_FONT_UPPERCASE_A + 141231TILE_FONT_UPPERCASE_P: equ TILE_FONT_UPPERCASE_A + 151232TILE_FONT_UPPERCASE_Q: equ TILE_FONT_UPPERCASE_A + 161233TILE_FONT_UPPERCASE_R: equ TILE_FONT_UPPERCASE_A + 171234TILE_FONT_UPPERCASE_S: equ TILE_FONT_UPPERCASE_A + 181235TILE_FONT_UPPERCASE_T: equ TILE_FONT_UPPERCASE_A + 191236TILE_FONT_UPPERCASE_U: equ TILE_FONT_UPPERCASE_A + 201237TILE_FONT_UPPERCASE_V: equ TILE_FONT_UPPERCASE_A + 211238TILE_FONT_UPPERCASE_W: equ TILE_FONT_UPPERCASE_A + 221239TILE_FONT_UPPERCASE_X: equ TILE_FONT_UPPERCASE_A + 231240TILE_FONT_UPPERCASE_Y: equ TILE_FONT_UPPERCASE_A + 241241TILE_FONT_UPPERCASE_Z: equ TILE_FONT_UPPERCASE_A + 251243 1244 db 00000000 b1245 db 00011000 b1246 db 00111100 b1247 db 01100110 b1248 db 01100110 b1249 db 01111110 b1250 db 01100110 b1251 db 00000000 b1252 1253 db 00000000 b1254 db 01111100 b1255 db 01100110 b1256 db 01111100 b1257 db 01100110 b1258 db 01100110 b1259 db 01111100 b1260 db 00000000 b1261 1262 db 00000000 b1263 db 00111100 b1264 db 01100110 b1265 db 01100000 b1266 db 01100000 b1267 db 01100110 b1268 db 00111100 b1269 db 00000000 b1270 1271 db 00000000 b1272 db 01111000 b1273 db 01101100 b1274 db 01100110 b1275 db 01100110 b1276 db 01101100 b1277 db 01111000 b1278 db 00000000 b1279 1280 db 00000000 b1281 db 01111110 b1282 db 01100000 b1283 db 01111100 b1284 db 01100000 b1285 db 01100000 b1286 db 01111110 b1287 db 00000000 b1288 1289 db 00000000 b1290 db 01111110 b1291 db 01100000 b1292 db 01111100 b1293 db 01100000 b1294 db 01100000 b1295 db 01100000 b1296 db 00000000 b1297 1298 db 00000000 b1299 db 00111110 b1300 db 01100000 b1301 db 01100000 b1302 db 01101110 b1303 db 01100110 b1304 db 00111110 b1305 db 00000000 b1306 1307 db 00000000 b1308 db 01100110 b1309 db 01100110 b1310 db 01111110 b1311 db 01100110 b1312 db 01100110 b1313 db 01100110 b1314 db 00000000 b1315 1316 db 00000000 b1317 db 01111110 b1318 db 00011000 b1319 db 00011000 b1320 db 00011000 b1321 db 00011000 b1322 db 01111110 b1323 db 00000000 b1324 1325 db 00000000 b1326 db 00000110 b1327 db 00000110 b1328 db 00000110 b1329 db 00000110 b1330 db 01100110 b1331 db 00111100 b1332 db 00000000 b1333 1334 db 00000000 b1335 db 01100110 b1336 db 01101100 b1337 db 01111000 b1338 db 01111000 b1339 db 01101100 b1340 db 01100110 b1341 db 00000000 b1342 1343 db 00000000 b1344 db 01100000 b1345 db 01100000 b1346 db 01100000 b1347 db 01100000 b1348 db 01100000 b1349 db 01111110 b1350 db 00000000 b1351 1352 db 00000000 b1353 db 01100011 b1354 db 01110111 b1355 db 01111111 b1356 db 01101011 b1357 db 01100011 b1358 db 01100011 b1359 db 00000000 b1360 1361 db 00000000 b1362 db 01100110 b1363 db 01110110 b1364 db 01111110 b1365 db 01111110 b1366 db 01101110 b1367 db 01100110 b1368 db 00000000 b1369 1370 db 00000000 b1371 db 00111100 b1372 db 01100110 b1373 db 01100110 b1374 db 01100110 b1375 db 01100110 b1376 db 00111100 b1377 db 00000000 b1378 1379 db 00000000 b1380 db 01111100 b1381 db 01100110 b1382 db 01100110 b1383 db 01111100 b1384 db 01100000 b1385 db 01100000 b1386 db 00000000 b1387 1388 db 00000000 b1389 db 00111100 b1390 db 01100110 b1391 db 01100110 b1392 db 01100110 b1393 db 01101100 b1394 db 00110110 b1395 db 00000000 b1396 1397 db 00000000 b1398 db 01111100 b1399 db 01100110 b1400 db 01100110 b1401 db 01111100 b1402 db 01101100 b1403 db 01100110 b1404 db 00000000 b1405 1406 db 00000000 b1407 db 00111100 b1408 db 01100000 b1409 db 00111100 b1410 db 00000110 b1411 db 00000110 b1412 db 00111100 b1413 db 00000000 b1414 1415 db 00000000 b1416 db 01111110 b1417 db 00011000 b1418 db 00011000 b1419 db 00011000 b1420 db 00011000 b1421 db 00011000 b1422 db 00000000 b1423 1424 db 00000000 b1425 db 01100110 b1426 db 01100110 b1427 db 01100110 b1428 db 01100110 b1429 db 01100110 b1430 db 01111110 b1431 db 00000000 b1432 1433 db 00000000 b1434 db 01100110 b1435 db 01100110 b1436 db 01100110 b1437 db 01100110 b1438 db 00111100 b1439 db 00011000 b1440 db 00000000 b1441 1442 db 00000000 b1443 db 01100011 b1444 db 01100011 b1445 db 01101011 b1446 db 01111111 b1447 db 01110111 b1448 db 01100011 b1449 db 00000000 b1450 1451 db 00000000 b1452 db 01100110 b1453 db 01100110 b1454 db 00111100 b1455 db 00111100 b1456 db 01100110 b1457 db 01100110 b1458 db 00000000 b1459 1460 db 00000000 b1461 db 01100110 b1462 db 01100110 b1463 db 00111100 b1464 db 00011000 b1465 db 00011000 b1466 db 00011000 b1467 db 00000000 b1468 1469 db 00000000 b1470 db 01111110 b1471 db 00001100 b1472 db 00011000 b1473 db 00110000 b1474 db 01100000 b1475 db 01111110 b1476 db 00000000 b14781480TILE_FONT_SYMBOLS_PATTERNS:1482TILE_FONT_SYMBOLS: equ TILE_FONT_UPPERCASE_A + 261484TILE_EXCLAMATION: equ TILE_FONT_SYMBOLS + 01485 db 00000000 b1486 db 00011000 b1487 db 00011000 b1488 db 00011000 b1489 db 00011000 b1490 db 00000000 b1491 db 00011000 b1492 db 00000000 b1494TILE_DOUBLE_QUOTE: equ TILE_FONT_SYMBOLS + 11495 db 00000000 b1496 db 01100110 b1497 db 01100110 b1498 db 01100110 b1499 db 00000000 b1500 db 00000000 b1501 db 00000000 b1502 db 00000000 b1504TILE_PERCENT: equ TILE_FONT_SYMBOLS + 21505 db 00000000 b1506 db 01100110 b1507 db 01101100 b1508 db 00011000 b1509 db 00110000 b1510 db 01100110 b1511 db 01000110 b1512 db 00000000 b1514TILE_SINGLE_QUOTE: equ TILE_FONT_SYMBOLS + 31515 db 00000000 b1516 db 00011000 b1517 db 00011000 b1518 db 00011000 b1519 db 00000000 b1520 db 00000000 b1521 db 00000000 b1522 db 00000000 b1524TILE_OPEN_ROUND_BRACKETS: equ TILE_FONT_SYMBOLS + 41525 db 00000000 b1526 db 00001110 b1527 db 00011100 b1528 db 00011000 b1529 db 00011000 b1530 db 00011100 b1531 db 00001110 b1532 db 00000000 b1534TILE_CLOSE_ROUND_BRACKETS: equ TILE_FONT_SYMBOLS + 51535 db 00000000 b1536 db 01110000 b1537 db 00111000 b1538 db 00011000 b1539 db 00011000 b1540 db 00111000 b1541 db 01110000 b1542 db 00000000 b1544TILE_STAR: equ TILE_FONT_SYMBOLS + 61545 db 00000000 b1546 db 01100110 b1547 db 00111100 b1548 db 11111111 b1549 db 00111100 b1550 db 01100110 b1551 db 00000000 b1552 db 00000000 b1554TILE_PLUS: equ TILE_FONT_SYMBOLS + 71555 db 00000000 b1556 db 00011000 b1557 db 00011000 b1558 db 01111110 b1559 db 00011000 b1560 db 00011000 b1561 db 00000000 b1562 db 00000000 b1564TILE_COMMA: equ TILE_FONT_SYMBOLS + 81565 db 00000000 b1566 db 00000000 b1567 db 00000000 b1568 db 00000000 b1569 db 00000000 b1570 db 00011000 b1571 db 00011000 b1572 db 00110000 b1574TILE_MINUS: equ TILE_FONT_SYMBOLS + 91575 db 00000000 b1576 db 00000000 b1577 db 00000000 b1578 db 01111110 b1579 db 00000000 b1580 db 00000000 b1581 db 00000000 b1582 db 00000000 b1584TILE_DOT: equ TILE_FONT_SYMBOLS + 101585 db 00000000 b1586 db 00000000 b1587 db 00000000 b1588 db 00000000 b1589 db 00000000 b1590 db 00011000 b1591 db 00011000 b1592 db 00000000 b1594TILE_SLASH: equ TILE_FONT_SYMBOLS + 111595 db 00000000 b1596 db 00000110 b1597 db 00001100 b1598 db 00011000 b1599 db 00110000 b1600 db 01100000 b1601 db 01000000 b1602 db 00000000 b1604TILE_COLON: equ TILE_FONT_SYMBOLS + 121605 db 00000000 b1606 db 00000000 b1607 db 00011000 b1608 db 00011000 b1609 db 00000000 b1610 db 00011000 b1611 db 00011000 b1612 db 00000000 b1614TILE_SEMICOLON: equ TILE_FONT_SYMBOLS + 131615 db 00000000 b1616 db 00000000 b1617 db 00011000 b1618 db 00011000 b1619 db 00000000 b1620 db 00011000 b1621 db 00011000 b1622 db 00110000 b1623 1624 db 00000110 b1625 db 00001100 b1626 db 00011000 b1627 db 00110000 b1628 db 00011000 b1629 db 00001100 b1630 db 00000110 b1631 db 00000000 b1633TILE_EQUAL: equ TILE_FONT_SYMBOLS + 151634 db 00000000 b1635 db 00000000 b1636 db 01111110 b1637 db 00000000 b1638 db 00000000 b1639 db 01111110 b1640 db 00000000 b1641 db 00000000 b1642 1643 db 01100000 b1644 db 00110000 b1645 db 00011000 b1646 db 00001100 b1647 db 00011000 b1648 db 00110000 b1649 db 01100000 b1650 db 00000000 b1651 1652 db 00000000 b1653 db 00111100 b1654 db 01100110 b1655 db 00001100 b1656 db 00011000 b1657 db 00000000 b1658 db 00011000 b1659 db 00000000 b1660 1661 db 00011000 b1662 db 00111100 b1663 db 01100000 b1664 db 00111100 b1665 db 00000110 b1666 db 00000110 b1667 db 00111100 b1668 db 00000000 b1669 1670 db 00000000 b1671 db 01000000 b1672 db 01100000 b1673 db 00110000 b1674 db 00011000 b1675 db 00001100 b1676 db 00000110 b1677 db 00000000 b1678 1679 db 00000000 b1680 db 00001000 b1681 db 00011100 b1682 db 00110110 b1683 db 01100011 b1684 db 00000000 b1685 db 00000000 b1686 db 00000000 b1687 1688 db 00000000 b1689 db 00000000 b1690 db 00000000 b1691 db 00000000 b1692 db 00000000 b1693 db 00000000 b1694 db 11111111 b1695 db 00000000 b16971699TILE_FILLED_COLORS_PATTERNS:1701TILE_FILLED_COLORS: equ TILE_FONT_SYMBOLS + 221703TILE_COLOR_1: equ TILE_EMPTY_BLACK1705TILE_COLOR_2: equ TILE_FILLED_COLORS + 01706 db 11111111 b1707 db 11111111 b1708 db 11111111 b1709 db 11111111 b1710 db 11111111 b1711 db 11111111 b1712 db 11111111 b1713 db 11111111 b1715TILE_COLOR_3: equ TILE_FILLED_COLORS + 11716 db 11111111 b1717 db 11111111 b1718 db 11111111 b1719 db 11111111 b1720 db 11111111 b1721 db 11111111 b1722 db 11111111 b1723 db 11111111 b1725TILE_COLOR_4: equ TILE_FILLED_COLORS + 21726 db 11111111 b1727 db 11111111 b1728 db 11111111 b1729 db 11111111 b1730 db 11111111 b1731 db 11111111 b1732 db 11111111 b1733 db 11111111 b1735TILE_COLOR_5: equ TILE_FILLED_COLORS + 31736 db 11111111 b1737 db 11111111 b1738 db 11111111 b1739 db 11111111 b1740 db 11111111 b1741 db 11111111 b1742 db 11111111 b1743 db 11111111 b1745TILE_COLOR_6: equ TILE_FILLED_COLORS + 41746 db 11111111 b1747 db 11111111 b1748 db 11111111 b1749 db 11111111 b1750 db 11111111 b1751 db 11111111 b1752 db 11111111 b1753 db 11111111 b1755TILE_COLOR_7: equ TILE_FILLED_COLORS + 51756 db 11111111 b1757 db 11111111 b1758 db 11111111 b1759 db 11111111 b1760 db 11111111 b1761 db 11111111 b1762 db 11111111 b1763 db 11111111 b1765TILE_COLOR_8: equ TILE_FILLED_COLORS + 61766 db 11111111 b1767 db 11111111 b1768 db 11111111 b1769 db 11111111 b1770 db 11111111 b1771 db 11111111 b1772 db 11111111 b1773 db 11111111 b1775TILE_COLOR_9: equ TILE_FILLED_COLORS + 71776 db 11111111 b1777 db 11111111 b1778 db 11111111 b1779 db 11111111 b1780 db 11111111 b1781 db 11111111 b1782 db 11111111 b1783 db 11111111 b1785TILE_COLOR_10: equ TILE_FILLED_COLORS + 81786 db 11111111 b1787 db 11111111 b1788 db 11111111 b1789 db 11111111 b1790 db 11111111 b1791 db 11111111 b1792 db 11111111 b1793 db 11111111 b1795TILE_COLOR_11: equ TILE_FILLED_COLORS + 91796 db 11111111 b1797 db 11111111 b1798 db 11111111 b1799 db 11111111 b1800 db 11111111 b1801 db 11111111 b1802 db 11111111 b1803 db 11111111 b1805TILE_COLOR_12: equ TILE_FILLED_COLORS + 101806 db 11111111 b1807 db 11111111 b1808 db 11111111 b1809 db 11111111 b1810 db 11111111 b1811 db 11111111 b1812 db 11111111 b1813 db 11111111 b1815TILE_COLOR_13: equ TILE_FILLED_COLORS + 111816 db 11111111 b1817 db 11111111 b1818 db 11111111 b1819 db 11111111 b1820 db 11111111 b1821 db 11111111 b1822 db 11111111 b1823 db 11111111 b1825TILE_COLOR_14: equ TILE_FILLED_COLORS + 121826 db 11111111 b1827 db 11111111 b1828 db 11111111 b1829 db 11111111 b1830 db 11111111 b1831 db 11111111 b1832 db 11111111 b1833 db 11111111 b1835TILE_COLOR_15: equ TILE_EMPTY18371839TILE_PATTERNS.size: equ $ - TILE_PATTERNS18411843184518471849TILE_MOUSE_OVER: equ TILE_BASE_DESKTOP_ICONS - 1185118531855NUMBER_OF_TILES_PER_ICON: equ 91857TILE_BASE_DESKTOP_ICONS: equ 190 1859 TILE_BASE_DESKTOP_ICON_0: equ TILE_BASE_DESKTOP_ICONS + (NUMBER_OF_TILES_PER_ICON * 0)1860 TILE_BASE_DESKTOP_ICON_1: equ TILE_BASE_DESKTOP_ICONS + (NUMBER_OF_TILES_PER_ICON * 1)186218641866NUMBER_OF_TILES_RESERVED_PER_PROCESS: equ 121868TILE_BASE_INDEX_PROCESSES: equ 208 1870 TILE_BASE_INDEX_PROCESS_0: equ TILE_BASE_INDEX_PROCESSES + (NUMBER_OF_TILES_RESERVED_PER_PROCESS * 0)1871 TILE_BASE_INDEX_PROCESS_1: equ TILE_BASE_INDEX_PROCESSES + (NUMBER_OF_TILES_RESERVED_PER_PROCESS * 1)1872 TILE_BASE_INDEX_PROCESS_2: equ TILE_BASE_INDEX_PROCESSES + (NUMBER_OF_TILES_RESERVED_PER_PROCESS * 2)1873 TILE_BASE_INDEX_PROCESS_3: equ TILE_BASE_INDEX_PROCESSES + (NUMBER_OF_TILES_RESERVED_PER_PROCESS * 3)1874System\Main.s33 Graphics/Sprites.s1SPRITE_PATTERNS:3SPRITE_CURSOR_ARROW_PATTERN:5SPRITE_INDEX_CURSOR_0: equ 0 * 46 8 DB 10000000b9 DB 11000000b10 DB 10100000b11 DB 10010000b12 DB 10001000b13 DB 10000100b14 DB 10000010b15 DB 10000001b16 DB 10000000b17 DB 10000000b18 DB 10000011b19 DB 10010010b20 DB 10101001b21 DB 11001001b22 DB 00000110b23 DB 00000000b24 DB 00000000b25 DB 00000000b26 DB 00000000b27 DB 00000000b28 DB 00000000b29 DB 00000000b30 DB 00000000b31 DB 00000000b32 DB 10000000b33 DB 01000000b34 DB 11000000b35 DB 00000000b36 DB 00000000b37 DB 00000000b38 DB 00000000b39 DB 00000000b40SPRITE_INDEX_CURSOR_1: equ 1 * 441 42 DB 00000000b43 DB 00000000b44 DB 01000000b45 DB 01100000b46 DB 01110000b47 DB 01111000b48 DB 01111100b49 DB 01111110b50 DB 01111111b51 DB 01111111b52 DB 01111100b53 DB 01101100b54 DB 01000110b55 DB 00000110b56 DB 00000000b57 DB 00000000b58 DB 00000000b59 DB 00000000b60 DB 00000000b61 DB 00000000b62 DB 00000000b63 DB 00000000b64 DB 00000000b65 DB 00000000b66 DB 00000000b67 DB 10000000b68 DB 00000000b69 DB 00000000b70 DB 00000000b71 DB 00000000b72 DB 00000000b73 DB 00000000b74SPRITE_CURSOR_ARROW_PATTERN.size: equ $ - SPRITE_CURSOR_ARROW_PATTERN76SPRITE_INDEX_WINDOW_TOP_LEFT: equ 2 * 477 DB 11001100 b78 DB 10000000 b79 DB 00000000 b80 DB 00000000 b81 DB 10000000 b82 DB 10000000 b83 DB 00000000 b84 DB 00000000 b86 DB 10000000 b87 DB 10000000 b88 DB 00000000 b89 DB 00000000 b90 DB 10000000 b91 DB 10000000 b92 DB 00000000 b93 DB 00000000 b95 DB 11001100 b96 DB 00000000 b97 DB 00000000 b98 DB 00000000 b99 DB 00000000 b100 DB 00000000 b101 DB 00000000 b102 DB 00000000 b104 DB 00000000 b105 DB 00000000 b106 DB 00000000 b107 DB 00000000 b108 DB 00000000 b109 DB 00000000 b110 DB 00000000 b111 DB 00000000 b113SPRITE_INDEX_WINDOW_TOP_RIGHT: equ 3 * 4114 DB 11001100 b115 DB 00000000 b116 DB 00000000 b117 DB 00000000 b118 DB 00000000 b119 DB 00000000 b120 DB 00000000 b121 DB 00000000 b123 DB 00000000 b124 DB 00000000 b125 DB 00000000 b126 DB 00000000 b127 DB 00000000 b128 DB 00000000 b129 DB 00000000 b130 DB 00000000 b132 DB 00110011 b133 DB 00000001 b134 DB 00000000 b135 DB 00000000 b136 DB 00000001 b137 DB 00000001 b138 DB 00000000 b139 DB 00000000 b141 DB 00000001 b142 DB 00000001 b143 DB 00000000 b144 DB 00000000 b145 DB 00000001 b146 DB 00000001 b147 DB 00000000 b148 DB 00000000 b150SPRITE_INDEX_WINDOW_BOTTOM_LEFT: equ 4 * 4151 DB 00000000 b152 DB 00000000 b153 DB 10000000 b154 DB 10000000 b155 DB 00000000 b156 DB 00000000 b157 DB 10000000 b158 DB 10000000 b160 DB 00000000 b161 DB 00000000 b162 DB 10000000 b163 DB 10000000 b164 DB 00000000 b165 DB 00000000 b166 DB 10000000 b167 DB 11001100 b169 DB 00000000 b170 DB 00000000 b171 DB 00000000 b172 DB 00000000 b173 DB 00000000 b174 DB 00000000 b175 DB 00000000 b176 DB 00000000 b178 DB 00000000 b179 DB 00000000 b180 DB 00000000 b181 DB 00000000 b182 DB 00000000 b183 DB 00000000 b184 DB 00000000 b185 DB 11001100 b187SPRITE_INDEX_WINDOW_BOTTOM_RIGHT: equ 5 * 4188 DB 00000000 b189 DB 00000000 b190 DB 00000000 b191 DB 00000000 b192 DB 00000000 b193 DB 00000000 b194 DB 00000000 b195 DB 00000000 b197 DB 00000000 b198 DB 00000000 b199 DB 00000000 b200 DB 00000000 b201 DB 00000000 b202 DB 00000000 b203 DB 00000000 b204 DB 00110011 b206 DB 00000000 b207 DB 00000000 b208 DB 00000001 b209 DB 00000001 b210 DB 00000000 b211 DB 00000000 b212 DB 00000001 b213 DB 00000001 b215 DB 00000000 b216 DB 00000000 b217 DB 00000001 b218 DB 00000001 b219 DB 00000000 b220 DB 00000000 b221 DB 00000001 b222 DB 00110011 b224SPRITE_PATTERNS.size: equ $ - SPRITE_PATTERNS228SPRITE_CURSOR_RESIZE_PATTERN:229 230 DB 11111110b231 DB 10000100b232 DB 10001000b233 DB 10000100b234 DB 10100010b235 DB 11010001b236 DB 10001000b237 DB 00000100b238 DB 00000010b239 DB 00000001b240 DB 00000000b241 DB 00000000b242 DB 00000000b243 DB 00000000b244 DB 00000000b245 DB 00000000b246 DB 00000000b247 DB 00000000b248 DB 00000000b249 DB 00000000b250 DB 00000000b251 DB 00000000b252 DB 10000000b253 DB 01000000b254 DB 00100000b255 DB 00010001b256 DB 10001011b257 DB 01000101b258 DB 00100001b259 DB 00010001b260 DB 00100001b261 DB 01111111b262 263 DB 00000000b264 DB 01111000b265 DB 01110000b266 DB 01111000b267 DB 01011100b268 DB 00001110b269 DB 00000111b270 DB 00000011b271 DB 00000001b272 DB 00000000b273 DB 00000000b274 DB 00000000b275 DB 00000000b276 DB 00000000b277 DB 00000000b278 DB 00000000b279 DB 00000000b280 DB 00000000b281 DB 00000000b282 DB 00000000b283 DB 00000000b284 DB 00000000b285 DB 00000000b286 DB 10000000b287 DB 11000000b288 DB 11100000b289 DB 01110000b290 DB 00111010b291 DB 00011110b292 DB 00001110b293 DB 00011110b294 DB 00000000b295.size: equ $ - SPRITE_CURSOR_RESIZE_PATTERNSystem\Main.s34Assets_Size: equ $ - Assets_Start 3738Apps_Start:39 Apps/Notepad/Header.s1Notepad:34.Header:6.processId: db 255 7.windowState: db WINDOW_STATE.RESTORED8.x: db 8 - 39.y: db 410.width: db 1411.height: db 812.minWidth: db 1213.minHeight: db 715.windowTitle:16 db TILE_FONT_REVERSED_LOWERCASE_A + 13 17 db TILE_FONT_REVERSED_LOWERCASE_A + 14 18 db TILE_FONT_REVERSED_LOWERCASE_A + 19 19 db TILE_FONT_REVERSED_LOWERCASE_A + 4 20 db TILE_FONT_REVERSED_LOWERCASE_A + 15 21 db TILE_FONT_REVERSED_LOWERCASE_A + 0 22 db TILE_FONT_REVERSED_LOWERCASE_A + 3 23 db 0 24 db 025 db 026 db 027 db 028 db 029 db 030 db 031 db 032.taskbarTitle:33 db TILE_FONT_REVERSED_LOWERCASE_A + 13 34 db TILE_FONT_REVERSED_LOWERCASE_A + 14 35 db TILE_FONT_REVERSED_LOWERCASE_A + 19 36 db TILE_FONT_REVERSED_LOWERCASE_A + 4 37.iconTitle:38 db TILE_FONT_LOWERCASE_A + 13 39 db TILE_FONT_LOWERCASE_A + 14 40 db TILE_FONT_LOWERCASE_A + 19 41 db TILE_FONT_LOWERCASE_A + 4 42 db TILE_FONT_LOWERCASE_A + 15 43 db TILE_FONT_LOWERCASE_A + 0 44 db TILE_FONT_LOWERCASE_A + 3 46.isFixedSize: db 047.vertScrollbarEnabled: db 048.vertScrollbarPosition: db 051.openAddr: dw Notepad_Open52.workAddr: dw Notepad_Work53.drawAddr: dw Notepad_Draw54.clickAddr: dw Notepad_Click55.getFocusAddr: dw Notepad_GetFocus56.loseFocusAddr: dw Notepad_LoseFocus57.closeAddr: dw Notepad_Close59.iconAddr: dw Notepad_Icon61.ramSize: dw 1024 6465Notepad.StartProgramCode:67Notepad_Open:68 Apps/Notepad/Open.s15 9 12 13 xor a14 ld (iy + NOTEPAD_VARS.CURSOR_POSITION), a16 17 ld a, TEXT_END_OF_FILE18 ld (iy + NOTEPAD_VARS.TEXT_START), a20 21 call BIOS_KILBUF23 27 ret28Apps/Notepad/Header.s70Notepad_Work:71 Apps/Notepad/Work.s15 call BIOS_CHSNS 6 jp z, .return 8 call BIOS_CHGET9 11 cp 9712 ret c13 14 cp 122 + 115 ret nc17 21 28 32 35 36 ld b, TILE_FONT_LOWERCASE_A - ASCII_CODE_LOWERCASE_A37 add b39 40 ld d, 041 ld e, (iy + NOTEPAD_VARS.CURSOR_POSITION)42 push iy43 add iy, de44 ld (iy + NOTEPAD_VARS.TEXT_START), a45 pop iy46 47 48 inc (iy + NOTEPAD_VARS.CURSOR_POSITION)50 51 ld a, TEXT_END_OF_FILE52 ld d, 053 ld e, (iy + NOTEPAD_VARS.CURSOR_POSITION)54 push iy55 add iy, de56 ld (iy + NOTEPAD_VARS.TEXT_START), a57 pop iy60 61 ld e, (ix + PROCESS_STRUCT_IX.drawAddr) 62 ld d, (ix + PROCESS_STRUCT_IX.drawAddr + 1) 63 call JP_DE65 71 72 75 78 81 85 88 92 96 ret98.return:99 102 retApps/Notepad/Header.s73Notepad_Draw:74 Apps/Notepad/Draw.s15 6 call GET_WINDOW_NAMTBL_LAST_USEFUL_COLUMN8 call BIOS_SETWRT9 ld c, PORT_010 ld a, TILE_ARROW_UP11 out (c), a13 call GET_WINDOW_USEFUL_HEIGHT14 sub 3 15 ld b, a16 ld de, 3217 add hl, de 18.loop_1:19 call BIOS_SETWRT20 ld a, TILE_DOTS_VERTICAL21 out (c), a22 add hl, de 23 djnz .loop_125 call BIOS_SETWRT26 ld c, PORT_027 ld a, TILE_ARROW_DOWN28 out (c), a30 32 34 call GET_USEFUL_WINDOW_BASE_NAMTBL35 push hl36 call GET_WINDOW_USEFUL_HEIGHT37 sub 138 ld h, 039 ld l, a40 add hl, hl 41 add hl, hl42 add hl, hl43 add hl, hl44 add hl, hl45 ex de, hl46 pop hl47 add hl, de50 call BIOS_SETWRT51 ld c, PORT_052 ld a, TILE_ARROW_LEFT53 out (c), a55 call GET_WINDOW_USEFUL_WIDTH56 sub 3 57 ld b, a58.loop_2:59 ld a, TILE_DOTS_HORIZONTAL60 out (c), a61 djnz .loop_263 ld a, TILE_ARROW_RIGHT64 out (c), a66 69 call GET_USEFUL_WINDOW_BASE_NAMTBL71 call BIOS_SETWRT73 77 81 84 86 ld d, 0 87 push iy88.loop:89 ld a, (iy + NOTEPAD_VARS.TEXT_START)90 cp TEXT_END_OF_FILE91 jp z, .endLoop92 93 ld e, a95 ld a, (ix + PROCESS_STRUCT_IX.windowState)96 cp WINDOW_STATE.RESTORED97 jp z, .isRestored99 100 ld b, 32101 jp .checkWidth103 .isRestored:104 105 ld a, (ix + PROCESS_STRUCT_IX.width)106 sub 3107 ld b, a108 109 .checkWidth:110 ld a, d111 112 cp b113 jp nc, .ignore115 ld a, e116 out (PORT_0), a117 118 .ignore:120 inc d121 inc iy122 jp .loop124.endLoop:125 pop iy127 ret128Apps/Notepad/Header.s76Notepad_Click:77 Apps/Notepad/Click.s16 7 8 retApps/Notepad/Header.s79Notepad_GetFocus:80 Apps/Notepad/GetFocus.s15 6 call BIOS_KILBUF7 8 retApps/Notepad/Header.s82Notepad_LoseFocus:83 Apps/Notepad/LoseFocus.s15 6 7 retApps/Notepad/Header.s85Notepad_Close:86 Apps/Notepad/Close.s15 7 15 retApps/Notepad/Header.s88Notepad.EndProgramCode: 9293Notepad.StartProgramData:95Notepad_Icon:96 Apps/Notepad/Icon.s12 DB 00000000b3 DB 00000001b4 DB 00000010b5 DB 00000010b6 DB 00000100b7 DB 00000100b8 DB 00001000b9 DB 00001000b11 DB 00010001b12 DB 00010000b13 DB 00100000b14 DB 00100000b15 DB 01000000b16 DB 01000000b17 DB 10000000b18 DB 10000000b20 DB 10000000b21 DB 01111111b22 DB 00000000b23 DB 00000000b24 DB 00000000b25 DB 00000000b26 DB 00000000b27 DB 00000000b2931 DB 01101101b32 DB 10110110b33 DB 01001001b34 DB 00000000b35 DB 00000000b36 DB 00000000b37 DB 11111111b38 DB 00000000b40 DB 11111110b41 DB 00000000b42 DB 00000000b43 DB 00000000b44 DB 00000000b45 DB 00000001b46 DB 00000001b47 DB 00000010b49 DB 00000010b50 DB 11111101b51 DB 10000000b52 DB 10111111b53 DB 10000000b54 DB 10101010b55 DB 01111111b56 DB 00111111b5859 DB 10110000b60 DB 11011100b61 DB 00100110b62 DB 00001011b63 DB 00001011b64 DB 00010011b65 DB 00010111b66 DB 00100011b68 DB 00100111b69 DB 01010011b70 DB 01000111b71 DB 10110011b72 DB 10000111b73 DB 01110011b74 DB 00000111b75 DB 11110011b77 DB 00000111b78 DB 11110011b79 DB 00000111b80 DB 11110011b81 DB 00000111b82 DB 10101111b83 DB 11111110b84 DB 11111100b85Apps/Notepad/Header.s98Notepad_Data:99 Apps/Notepad/Data.s12NOTEPAD_VARS:3 .CURSOR_POSITION: equ 04 5 .TEXT_START: equ 17TEXT_END_OF_FILE: equ 25591113Apps/Notepad/Header.s101Notepad.EndProgramData: 103System\Main.s40 Apps/Calc/Header.s1Calc:34.Header:6.processId: db 255 7.windowState: db WINDOW_STATE.RESTORED8.x: db 8 + 139.y: db 810.width: db 1411.height: db 1812.minWidth: db 1413.minHeight: db 1815.windowTitle:16 db TILE_FONT_REVERSED_LOWERCASE_A + 2 17 db TILE_FONT_REVERSED_LOWERCASE_A + 0 18 db TILE_FONT_REVERSED_LOWERCASE_A + 11 19 db TILE_FONT_REVERSED_LOWERCASE_A + 2 20 db 0 21 db 022 db 023 db 024 db 025 db 026 db 027 db 028 db 029 db 030 db 031 db 032.taskbarTitle:33 db TILE_FONT_REVERSED_LOWERCASE_A + 2 34 db TILE_FONT_REVERSED_LOWERCASE_A + 0 35 db TILE_FONT_REVERSED_LOWERCASE_A + 11 36 db TILE_FONT_REVERSED_LOWERCASE_A + 2 37.iconTitle:38 db TILE_EMPTY39 db TILE_FONT_LOWERCASE_A + 2 40 db TILE_FONT_LOWERCASE_A + 0 41 db TILE_FONT_LOWERCASE_A + 11 42 db TILE_FONT_LOWERCASE_A + 2 43 db TILE_EMPTY44 db TILE_EMPTY46.isFixedSize: db 047.vertScrollbarEnabled: db 048.vertScrollbarPosition: db 051.openAddr: dw Calc_Open52.workAddr: dw Calc_Work53.drawAddr: dw Calc_Draw54.clickAddr: dw Calc_Click55.getFocusAddr: dw Calc_GetFocus56.loseFocusAddr: dw Calc_LoseFocus57.closeAddr: dw Calc_Close59.iconAddr: dw Calc_Icon61.ramSize: dw 1024 6465Calc.StartProgramCode:67Calc_Open:68 Apps/Calc/Open.s15 11 12 15 17 23 retApps/Calc/Header.s70Calc_Work:71 Apps/Calc/Work.s17 retApps/Calc/Header.s73Calc_Draw:74 Apps/Calc/Draw.s16 call GET_USEFUL_WINDOW_BASE_NAMTBL8 9 ld a, (ix + PROCESS_STRUCT_IX.windowState)10 cp WINDOW_STATE.MAXIMIZED11 jp nz, .skip_112 inc hl13.skip_1:15 ex de, hl17 18 ld hl, Calc_Data.CALC_DISPLAY_TILES 19 ld b, 12 20 ld c, 2 + 12 21 call DRAW_ON_WINDOW_USEFUL_AREA23 ret24Apps/Calc/Header.s76Calc_Click:77 Apps/Calc/Click.s16 7 8 retApps/Calc/Header.s79Calc_GetFocus:80 Apps/Calc/GetFocus.s15 6 7 retApps/Calc/Header.s82Calc_LoseFocus:83 Apps/Calc/LoseFocus.s15 6 7 retApps/Calc/Header.s85Calc_Close:86 Apps/Calc/Close.s15 8 17 retApps/Calc/Header.s88Calc.EndProgramCode: 9293Calc.StartProgramData:95Calc_Icon:96 Apps/Calc/Icon.s1 DB 00000000b2 DB 00000000b3 DB 00111111b4 DB 01000000b5 DB 01011111b6 DB 01010000b7 DB 01011111b8 DB 01000000b10 DB 01001001b11 DB 01011011b12 DB 01000000b13 DB 01001001b14 DB 01011011b15 DB 01000000b16 DB 01001001b17 DB 01011011b19 DB 01000000b20 DB 00111111b21 DB 00011111b22 DB 00000000b23 DB 00000000b24 DB 00000000b25 DB 00000000b26 DB 00000000b28 DB 00000000b29 DB 00000000b30 DB 11111111b31 DB 00000000b32 DB 11111000b33 DB 00001000b34 DB 11111000b35 DB 00000000b37 DB 00100100b38 DB 01101101b39 DB 00000000b40 DB 00100100b41 DB 01101101b42 DB 00000000b43 DB 00100100b44 DB 01101101b46 DB 00000000b47 DB 11111111b48 DB 11111111b49 DB 00000000b50 DB 00000000b51 DB 00000000b52 DB 00000000b53 DB 00000000b55 DB 00000000b56 DB 00000000b57 DB 11111000b58 DB 00000100b59 DB 00000110b60 DB 00000110b61 DB 00000110b62 DB 00000110b64 DB 10010110b65 DB 10110110b66 DB 00000110b67 DB 10010110b68 DB 10110110b69 DB 00000110b70 DB 00010110b71 DB 11110110b73 DB 00000110b74 DB 11111110b75 DB 11111100b76 DB 00000000b77 DB 00000000b78 DB 00000000b79 DB 00000000b80 DB 00000000b81Apps/Calc/Header.s98Calc_Data:99 Apps/Calc/Data.s12.CALC_DISPLAY_TILES:3 db TILE_WINDOW_TITLE_MIDDLE_TOP4 db TILE_WINDOW_TITLE_MIDDLE_TOP5 db TILE_WINDOW_TITLE_MIDDLE_TOP6 db TILE_WINDOW_TITLE_MIDDLE_TOP7 db TILE_WINDOW_TITLE_MIDDLE_TOP8 db TILE_WINDOW_TITLE_MIDDLE_TOP9 db TILE_WINDOW_TITLE_MIDDLE_TOP10 db TILE_WINDOW_TITLE_MIDDLE_TOP11 db TILE_WINDOW_TITLE_MIDDLE_TOP12 db TILE_WINDOW_TITLE_MIDDLE_TOP13 db TILE_WINDOW_TITLE_MIDDLE_TOP14 db TILE_WINDOW_TITLE_MIDDLE_TOP16 db TILE_EMPTY_BLACK17 db TILE_EMPTY_BLACK18 db TILE_EMPTY_BLACK19 db TILE_EMPTY_BLACK20 db TILE_EMPTY_BLACK21 db TILE_EMPTY_BLACK22 db TILE_EMPTY_BLACK23 db TILE_EMPTY_BLACK24 db TILE_EMPTY_BLACK25 db TILE_FONT_REVERSED_NUMBERS_0 + 1 26 db TILE_FONT_REVERSED_NUMBERS_0 + 227 db TILE_FONT_REVERSED_NUMBERS_0 + 32931 db TILE_LINE_TOP_LEFT, TILE_LINE_HORIZONTAL, TILE_LINE_TOP_RIGHT32 db TILE_LINE_TOP_LEFT, TILE_LINE_HORIZONTAL, TILE_LINE_TOP_RIGHT33 db TILE_LINE_TOP_LEFT, TILE_LINE_HORIZONTAL, TILE_LINE_TOP_RIGHT34 db TILE_LINE_TOP_LEFT, TILE_LINE_HORIZONTAL, TILE_LINE_TOP_RIGHT36 db TILE_LINE_VERTICAL, TILE_FONT_NUMBERS_0 + 7, TILE_WINDOW_BORDER_RIGHT37 db TILE_LINE_VERTICAL, TILE_FONT_NUMBERS_0 + 8, TILE_WINDOW_BORDER_RIGHT38 db TILE_LINE_VERTICAL, TILE_FONT_NUMBERS_0 + 9, TILE_WINDOW_BORDER_RIGHT39 db TILE_LINE_VERTICAL, TILE_SLASH, TILE_WINDOW_BORDER_RIGHT41 db TILE_LINE_BOTTOM_LEFT, TILE_WINDOW_BORDER_MIDDLE_BOTTOM, TILE_LINE_BOTTOM_RIGHT_SHADOW42 db TILE_LINE_BOTTOM_LEFT, TILE_WINDOW_BORDER_MIDDLE_BOTTOM, TILE_LINE_BOTTOM_RIGHT_SHADOW43 db TILE_LINE_BOTTOM_LEFT, TILE_WINDOW_BORDER_MIDDLE_BOTTOM, TILE_LINE_BOTTOM_RIGHT_SHADOW44 db TILE_LINE_BOTTOM_LEFT, TILE_WINDOW_BORDER_MIDDLE_BOTTOM, TILE_LINE_BOTTOM_RIGHT_SHADOW46 47 db TILE_LINE_TOP_LEFT, TILE_LINE_HORIZONTAL, TILE_LINE_TOP_RIGHT48 db TILE_LINE_TOP_LEFT, TILE_LINE_HORIZONTAL, TILE_LINE_TOP_RIGHT49 db TILE_LINE_TOP_LEFT, TILE_LINE_HORIZONTAL, TILE_LINE_TOP_RIGHT50 db TILE_LINE_TOP_LEFT, TILE_LINE_HORIZONTAL, TILE_LINE_TOP_RIGHT52 db TILE_LINE_VERTICAL, TILE_FONT_NUMBERS_0 + 4, TILE_WINDOW_BORDER_RIGHT53 db TILE_LINE_VERTICAL, TILE_FONT_NUMBERS_0 + 5, TILE_WINDOW_BORDER_RIGHT54 db TILE_LINE_VERTICAL, TILE_FONT_NUMBERS_0 + 6, TILE_WINDOW_BORDER_RIGHT55 db TILE_LINE_VERTICAL, TILE_STAR, TILE_WINDOW_BORDER_RIGHT57 db TILE_LINE_BOTTOM_LEFT, TILE_WINDOW_BORDER_MIDDLE_BOTTOM, TILE_LINE_BOTTOM_RIGHT_SHADOW58 db TILE_LINE_BOTTOM_LEFT, TILE_WINDOW_BORDER_MIDDLE_BOTTOM, TILE_LINE_BOTTOM_RIGHT_SHADOW59 db TILE_LINE_BOTTOM_LEFT, TILE_WINDOW_BORDER_MIDDLE_BOTTOM, TILE_LINE_BOTTOM_RIGHT_SHADOW60 db TILE_LINE_BOTTOM_LEFT, TILE_WINDOW_BORDER_MIDDLE_BOTTOM, TILE_LINE_BOTTOM_RIGHT_SHADOW62 63 db TILE_LINE_TOP_LEFT, TILE_LINE_HORIZONTAL, TILE_LINE_TOP_RIGHT64 db TILE_LINE_TOP_LEFT, TILE_LINE_HORIZONTAL, TILE_LINE_TOP_RIGHT65 db TILE_LINE_TOP_LEFT, TILE_LINE_HORIZONTAL, TILE_LINE_TOP_RIGHT66 db TILE_LINE_TOP_LEFT, TILE_LINE_HORIZONTAL, TILE_LINE_TOP_RIGHT68 db TILE_LINE_VERTICAL, TILE_FONT_NUMBERS_0 + 1, TILE_WINDOW_BORDER_RIGHT69 db TILE_LINE_VERTICAL, TILE_FONT_NUMBERS_0 + 2, TILE_WINDOW_BORDER_RIGHT70 db TILE_LINE_VERTICAL, TILE_FONT_NUMBERS_0 + 3, TILE_WINDOW_BORDER_RIGHT71 db TILE_LINE_VERTICAL, TILE_MINUS, TILE_WINDOW_BORDER_RIGHT73 db TILE_LINE_BOTTOM_LEFT, TILE_WINDOW_BORDER_MIDDLE_BOTTOM, TILE_LINE_BOTTOM_RIGHT_SHADOW74 db TILE_LINE_BOTTOM_LEFT, TILE_WINDOW_BORDER_MIDDLE_BOTTOM, TILE_LINE_BOTTOM_RIGHT_SHADOW75 db TILE_LINE_BOTTOM_LEFT, TILE_WINDOW_BORDER_MIDDLE_BOTTOM, TILE_LINE_BOTTOM_RIGHT_SHADOW76 db TILE_LINE_BOTTOM_LEFT, TILE_WINDOW_BORDER_MIDDLE_BOTTOM, TILE_LINE_BOTTOM_RIGHT_SHADOW78 79 db TILE_LINE_TOP_LEFT, TILE_LINE_HORIZONTAL, TILE_LINE_TOP_RIGHT80 db TILE_LINE_TOP_LEFT, TILE_LINE_HORIZONTAL, TILE_LINE_TOP_RIGHT81 db TILE_LINE_TOP_LEFT, TILE_LINE_HORIZONTAL, TILE_LINE_TOP_RIGHT82 db TILE_LINE_TOP_LEFT, TILE_LINE_HORIZONTAL, TILE_LINE_TOP_RIGHT84 db TILE_LINE_VERTICAL, TILE_FONT_NUMBERS_0 + 0, TILE_WINDOW_BORDER_RIGHT85 db TILE_LINE_VERTICAL, TILE_DOT, TILE_WINDOW_BORDER_RIGHT86 db TILE_LINE_VERTICAL, TILE_EQUAL, TILE_WINDOW_BORDER_RIGHT87 db TILE_LINE_VERTICAL, TILE_PLUS, TILE_WINDOW_BORDER_RIGHT89 db TILE_LINE_BOTTOM_LEFT, TILE_WINDOW_BORDER_MIDDLE_BOTTOM, TILE_LINE_BOTTOM_RIGHT_SHADOW90 db TILE_LINE_BOTTOM_LEFT, TILE_WINDOW_BORDER_MIDDLE_BOTTOM, TILE_LINE_BOTTOM_RIGHT_SHADOW91 db TILE_LINE_BOTTOM_LEFT, TILE_WINDOW_BORDER_MIDDLE_BOTTOM, TILE_LINE_BOTTOM_RIGHT_SHADOW92 db TILE_LINE_BOTTOM_LEFT, TILE_WINDOW_BORDER_MIDDLE_BOTTOM, TILE_LINE_BOTTOM_RIGHT_SHADOW94Apps/Calc/Header.s101Calc.EndProgramData: 102System\Main.s41 Apps/Paint/Header.s1Paint:34.Header:6.processId: db 255 7.windowState: db WINDOW_STATE.RESTORED8.x: db 8 - 39.y: db 410.width: db 1411.height: db 812.minWidth: db 1213.minHeight: db 615.windowTitle:16 db TILE_FONT_REVERSED_LOWERCASE_A + 15 17 db TILE_FONT_REVERSED_LOWERCASE_A + 0 18 db TILE_FONT_REVERSED_LOWERCASE_A + 8 19 db TILE_FONT_REVERSED_LOWERCASE_A + 13 20 db TILE_FONT_REVERSED_LOWERCASE_A + 19 21 db 0 22 db 023 db 024 db 025 db 026 db 027 db 028 db 029 db 030 db 031 db 032.taskbarTitle:33 db TILE_FONT_REVERSED_LOWERCASE_A + 15 34 db TILE_FONT_REVERSED_LOWERCASE_A + 13 35 db TILE_FONT_REVERSED_LOWERCASE_A + 19 36 db TILE_EMPTY_BLACK37.iconTitle:38 db TILE_EMPTY39 db TILE_FONT_LOWERCASE_A + 15 40 db TILE_FONT_LOWERCASE_A + 0 41 db TILE_FONT_LOWERCASE_A + 8 42 db TILE_FONT_LOWERCASE_A + 13 43 db TILE_FONT_LOWERCASE_A + 19 44 db TILE_EMPTY46.isFixedSize: db 047.vertScrollbarEnabled: db 048.vertScrollbarPosition: db 051.openAddr: dw Paint_Open52.workAddr: dw Paint_Work53.drawAddr: dw Paint_Draw54.clickAddr: dw Paint_Click55.getFocusAddr: dw Paint_GetFocus56.loseFocusAddr: dw Paint_LoseFocus57.closeAddr: dw Paint_Close59.iconAddr: dw Paint_Icon61.ramSize: dw 1024 6465Paint.StartProgramCode:67Paint_Open:68 Apps/Paint/Open.s15 9 12 ld a, TILE_COLOR_1 13 ld (iy + PAINT_VARS.CURRENT_COLOR), a15 ret16Apps/Paint/Header.s70Paint_Work:71 Apps/Paint/Work.s15 ret6Apps/Paint/Header.s73Paint_Draw:74 Apps/Paint/Draw.s15 call GET_USEFUL_WINDOW_BASE_NAMTBL7 8 ld a, (ix + PROCESS_STRUCT_IX.windowState)9 cp WINDOW_STATE.MAXIMIZED10 jp nz, .skip_111 inc hl12.skip_1:14 ex de, hl16 17 push de18 ld hl, Paint_Data.PAINT_TOOLBAR 19 ld b, 3 20 ld c, 1 + 8 + 4 21 call DRAW_ON_WINDOW_USEFUL_AREA22 pop hl24 ret25Apps/Paint/Header.s76Paint_Click:77 Apps/Paint/Click.s16 push hl7 call GET_MOUSE_POSITION_IN_TILES9 12 call _CONVERT_COL_LINE_TO_LINEAR14 ld bc, NAMTBL15 add hl, bc19 call BIOS_SETWRT20 ld a, (iy + PAINT_VARS.CURRENT_COLOR)21 22 out (PORT_0), a23 pop hl25 29 retApps/Paint/Header.s79Paint_GetFocus:80 Apps/Paint/GetFocus.s15 6 7 retApps/Paint/Header.s82Paint_LoseFocus:83 Apps/Paint/LoseFocus.s15 6 7 retApps/Paint/Header.s85Paint_Close:86 Apps/Paint/Close.s15 7 retApps/Paint/Header.s88Paint.EndProgramCode: 9293Paint.StartProgramData:95Paint_Icon:96 Apps/Paint/Icon.s12 DB 00000000b3 DB 00000011b4 DB 00001100b5 DB 00010001b6 DB 00100011b7 DB 00100011b8 DB 00100001b9 DB 01000000b11 DB 01001110b12 DB 01001111b13 DB 01011111b14 DB 01011111b15 DB 01000000b16 DB 01000001b17 DB 00100011b18 DB 00100011b20 DB 00010011b21 DB 00010000b22 DB 00001000b23 DB 00000110b24 DB 00000011b25 DB 00000110b26 DB 00001100b27 DB 00000000b2931 DB 00000000b32 DB 11110000b33 DB 00001100b34 DB 11000110b35 DB 11100011b36 DB 11100001b37 DB 11000001b38 DB 00000000b39 DB 00000011b40 DB 00000100b41 DB 10001001b42 DB 00001010b43 DB 00000101b44 DB 10000011b45 DB 10000000b46 DB 11000011b49 DB 11001111b50 DB 11001111b51 DB 00000111b52 DB 00000000b54 DB 11111111b55 DB 11111111b56 DB 00000000b57 DB 00000000b5860 DB 00000000b61 DB 00000100b62 DB 00000110b63 DB 00000110b64 DB 00001010b65 DB 00010110b66 DB 10011110b67 DB 10101100b69 DB 11010000b70 DB 11100000b71 DB 01110000b72 DB 11011000b73 DB 01001100b74 DB 10001100b75 DB 00001100b76 DB 00001100b78 DB 10011100b79 DB 00111000b80 DB 01110000b81 DB 11100000b82 DB 11000000b83 DB 10000000b84 DB 00000000b85 DB 00000000b8788Apps/Paint/Header.s98Paint_Data:99 Apps/Paint/Data.s12.PAINT_TOOLBAR:4 db TILE_EMPTY5 db TILE_EMPTY6 db TILE_LINE_VERTICAL8 10 11 db TILE_COLOR_1 12 db TILE_COLOR_113 db TILE_LINE_VERTICAL15 16 db TILE_COLOR_217 db TILE_COLOR_318 db TILE_LINE_VERTICAL20 21 db TILE_COLOR_422 db TILE_COLOR_523 db TILE_LINE_VERTICAL25 26 db TILE_COLOR_627 db TILE_COLOR_728 db TILE_LINE_VERTICAL30 31 db TILE_COLOR_832 db TILE_COLOR_933 db TILE_LINE_VERTICAL35 36 db TILE_COLOR_1037 db TILE_COLOR_1138 db TILE_LINE_VERTICAL40 41 db TILE_COLOR_1242 db TILE_COLOR_1343 db TILE_LINE_VERTICAL45 46 db TILE_COLOR_1447 db TILE_COLOR_1548 db TILE_LINE_VERTICAL50 52 db TILE_EMPTY53 db TILE_EMPTY54 db TILE_LINE_VERTICAL56 57 db TILE_EMPTY58 db TILE_EMPTY59 db TILE_LINE_VERTICAL61 62 db TILE_EMPTY63 db TILE_EMPTY64 db TILE_LINE_VERTICAL66 67 db TILE_EMPTY68 db TILE_EMPTY69 db TILE_LINE_VERTICAL7274PAINT_VARS:75 .CURRENT_COLOR: equ 076Apps/Paint/Header.s101Paint.EndProgramData: 103System\Main.s42 Apps/Settings/Header.s1Settings:34.Header:6.processId: db 255 7.windowState: db WINDOW_STATE.RESTORED8.x: db 29.y: db 210.width: db 2011.height: db 1612.minWidth: db 2013.minHeight: db 615.windowTitle:16 db TILE_FONT_REVERSED_LOWERCASE_S17 db TILE_FONT_REVERSED_LOWERCASE_E18 db TILE_FONT_REVERSED_LOWERCASE_T19 db TILE_FONT_REVERSED_LOWERCASE_T20 db TILE_FONT_REVERSED_LOWERCASE_I21 db TILE_FONT_REVERSED_LOWERCASE_N22 db TILE_FONT_REVERSED_LOWERCASE_G23 db TILE_FONT_REVERSED_LOWERCASE_S24 db 0 25 db 026 db 027 db 028 db 029 db 030 db 031 db 032.taskbarTitle:33 db TILE_FONT_REVERSED_LOWERCASE_S34 db TILE_FONT_REVERSED_LOWERCASE_E35 db TILE_FONT_REVERSED_LOWERCASE_T36 db TILE_EMPTY_BLACK37.iconTitle:38 db TILE_FONT_LOWERCASE_S39 db TILE_FONT_LOWERCASE_E40 db TILE_FONT_LOWERCASE_T41 db TILE_FONT_LOWERCASE_T42 db TILE_FONT_LOWERCASE_I43 db TILE_FONT_LOWERCASE_N44 db TILE_FONT_LOWERCASE_G46.isFixedSize: db 047.vertScrollbarEnabled: db 048.vertScrollbarPosition: db 051.openAddr: dw Settings_Open52.workAddr: dw Settings_Work53.drawAddr: dw Settings_Draw54.clickAddr: dw Settings_Click55.getFocusAddr: dw Settings_GetFocus56.loseFocusAddr: dw Settings_LoseFocus57.closeAddr: dw Settings_Close59.iconAddr: dw Settings_Icon61.ramSize: dw 1024 6465Settings.StartProgramCode:67Settings_Open:68 Apps/Settings/Open.s15 9 12 13 ld a, SETTINGS_TABS_VALUES.TAB_VIDEO14 ld (iy + SETTINGS_VARS.TAB_SELECTED), a17 xor a18 ld (iy + SETTINGS_VARS.CHECKBOX_SHOW_TICKS_VALUE), a20 ret21Apps/Settings/Header.s70Settings_Work:71 Apps/Settings/Work.s15 9 14 15 ld a, (iy + SETTINGS_VARS.TAB_SELECTED)16 cp SETTINGS_TABS_VALUES.TAB_TIME17 ret nz19 24 call Settings_Draw.DrawClock26 ret27Apps/Settings/Header.s73Settings_Draw:74 Apps/Settings/Draw.s15 call GET_USEFUL_WINDOW_BASE_NAMTBL7 ex de, hl9 10 ld hl, Settings_Data.SETTINGS_TABS 11 ld b, 18 12 ld c, 11 13 call DRAW_ON_WINDOW_USEFUL_AREA17 ld a, (iy + SETTINGS_VARS.TAB_SELECTED)18 cp SETTINGS_TABS_VALUES.TAB_VIDEO19 jp z, .drawCurrentTabVideo20 cp SETTINGS_TABS_VALUES.TAB_MOUSE21 jp z, .drawCurrentTabMouse22 cp SETTINGS_TABS_VALUES.TAB_TIME23 jp z, .drawCurrentTabTime26 ret28.drawCurrentTabVideo:29 call GET_USEFUL_WINDOW_BASE_NAMTBL30 ld de, 32 * 2 31 add hl, de32 ex de, hl34 ld hl, Settings_Data.CURRENT_TAB_VIDEO_TILES 35 ld b, 18 36 ld c, 1 37 call DRAW_ON_WINDOW_USEFUL_AREA39 40 call GET_USEFUL_WINDOW_BASE_NAMTBL41 ld de, 1 + (32 * 4) 42 add hl, de43 ex de, hl45 ld hl, Settings_Data.LABEL_COMBO_SCREEN_SAVER 46 ld b, 12 47 ld c, 1 48 call DRAW_ON_WINDOW_USEFUL_AREA51 52 call GET_USEFUL_WINDOW_BASE_NAMTBL53 ld de, 1 + (32 * 5) 54 add hl, de55 ex de, hl57 ld hl, Settings_Data.COMBO_SCREEN_SAVER 58 ld b, 12 59 ld c, 3 60 call DRAW_ON_WINDOW_USEFUL_AREA63 ret65.drawCurrentTabMouse:66 call GET_USEFUL_WINDOW_BASE_NAMTBL67 ld de, 32 * 2 68 add hl, de69 ex de, hl71 ld hl, Settings_Data.CURRENT_TAB_MOUSE_TILES 72 ld b, 18 73 ld c, 1 74 call DRAW_ON_WINDOW_USEFUL_AREA76 ret78.drawCurrentTabTime:79 call GET_USEFUL_WINDOW_BASE_NAMTBL80 ld de, 32 * 2 81 add hl, de82 ex de, hl84 ld hl, Settings_Data.CURRENT_TAB_TIME_TILES 85 ld b, 18 86 ld c, 1 87 call DRAW_ON_WINDOW_USEFUL_AREA91 92 call .DrawClock95 96 call GET_USEFUL_WINDOW_BASE_NAMTBL97 ld de, 2 + (32 * 7) 98 add hl, de99 ex de, hl101 push de102 ld hl, Settings_Data.CHECKBOX_SHOW_TICKS 103 ld b, 12 104 ld c, 1 105 call DRAW_ON_WINDOW_USEFUL_AREA108 109 ld a, (iy + SETTINGS_VARS.CHECKBOX_SHOW_TICKS_VALUE)110 or a111 pop hl112 ret z114 call BIOS_SETWRT115 ld a, TILE_CHECKBOX_CHECKED116 out (PORT_0), a117 120 ret124125.DrawClock:127 call GET_USEFUL_WINDOW_BASE_NAMTBL128 ld de, 2 + (32 * 5)129 add hl, de130 call BIOS_SETWRT131 ld c, PORT_0134 ld b, TILE_FONT_NUMBERS_0136 137 ld a, (OS.currentTime_Hours)138 srl a 139 srl a 140 srl a 141 srl a 142 or a143 jp z, .skipTensOfHours 144 add b 145 jp .continue146.skipTensOfHours:147 ld a, TILE_EMPTY148.continue:149 out (c), a151 152 ld a, (OS.currentTime_Hours)153 and 0000 1111 b154 add b 155 out (c), a157 158 nop159 nop160 ld a, TILE_COLON 161 out (c), a163 164 ld a, (OS.currentTime_Minutes)165 srl a 166 srl a 167 srl a 168 srl a 169 add b 170 out (c), a171 172 173 ld a, (OS.currentTime_Minutes)174 and 0000 1111 b175 add b 176 out (c), a178 179 nop180 nop181 ld a, TILE_COLON 182 out (c), a184 185 ld a, (OS.currentTime_Seconds)186 srl a 187 srl a 188 srl a 189 srl a 190 add b 191 out (c), a192 193 194 ld a, (OS.currentTime_Seconds)195 and 0000 1111 b196 add b 197 out (c), a200 201 ld a, (iy + SETTINGS_VARS.CHECKBOX_SHOW_TICKS_VALUE)202 or a203 ret z205 207 208 ld a, TILE_DOT 209 out (c), a211 212 ld a, (OS.timeCounter)213 ld d, a 214 and 1111 0000 b215 srl a 216 srl a 217 srl a 218 srl a 219 ld b, TILE_FONT_NUMBERS_0 + 0220 add b221 out (PORT_0), a223 ld a, d 224 and 0000 1111 b225 ld b, TILE_FONT_NUMBERS_0 + 0226 add b227 out (PORT_0), a233 ret234Apps/Settings/Header.s76Settings_Click:77 Apps/Settings/Click.s18 10 11 ld a, h12 cp 2 + 113 jp nc, .notClickOnTabs 16 17 ld a, l18 cp 5 + 119 jp nc, .continue_121 jp .ClickTab_Video23.continue_1:25 26 ld a, l27 cp 11 + 128 jp nc, .continue_230 jp .ClickTab_Mouse32.continue_2:34 35 ld a, l36 cp 16 + 137 jp nc, .continue_339 jp .ClickTab_Time41.continue_3:45 ret47.notClickOnTabs:49 ld a, (iy + SETTINGS_VARS.TAB_SELECTED)50 cp SETTINGS_TABS_VALUES.TAB_TIME51 jp z, .isOnTimeTab53 ret55.isOnTimeTab:57 59 ld a, h60 cp 761 ret nz63 64 ld a, l65 cp 266 ret nz68 73 78 79 ld a, (iy + SETTINGS_VARS.CHECKBOX_SHOW_TICKS_VALUE)80 or a81 jp z, .setCheckbox83 84 xor a85 ld (iy + SETTINGS_VARS.CHECKBOX_SHOW_TICKS_VALUE), a87 jp .return89.setCheckbox:90 ld a, 191 ld (iy + SETTINGS_VARS.CHECKBOX_SHOW_TICKS_VALUE), a92 jp .return94.ClickTab_Video:95 ld a, SETTINGS_TABS_VALUES.TAB_VIDEO96 ld (iy + SETTINGS_VARS.TAB_SELECTED), a97 jp .return99.ClickTab_Mouse:100 ld a, SETTINGS_TABS_VALUES.TAB_MOUSE101 ld (iy + SETTINGS_VARS.TAB_SELECTED), a102 jp .return104.ClickTab_Time:105 ld a, SETTINGS_TABS_VALUES.TAB_TIME106 ld (iy + SETTINGS_VARS.TAB_SELECTED), a107 jp .return109.return:110 111 ld e, (ix + PROCESS_STRUCT_IX.drawAddr) 112 ld d, (ix + PROCESS_STRUCT_IX.drawAddr + 1) 113 call JP_DE114 ret115Apps/Settings/Header.s79Settings_GetFocus:80 Apps/Settings/GetFocus.s15 6 7 retApps/Settings/Header.s82Settings_LoseFocus:83 Apps/Settings/LoseFocus.s15 6 7 retApps/Settings/Header.s85Settings_Close:86 Apps/Settings/Close.s15 7 retApps/Settings/Header.s88Settings.EndProgramCode: 9293Settings.StartProgramData:95Settings_Icon:96 Apps/Settings/Icon.s12 DB 00000000b3 DB 00000000b4 DB 00000000b5 DB 00000000b6 DB 00000110b7 DB 00001001b8 DB 00001000b9 DB 00000100b11 DB 00000100b12 DB 00111001b13 DB 00100000b14 DB 00101010b15 DB 00110100b16 DB 00011000b17 DB 00001001b18 DB 00001010b20 DB 00001010b21 DB 00001011b22 DB 00001110b23 DB 00000000b24 DB 00000000b25 DB 00000000b26 DB 00000000b27 DB 00000000b29 38 47 5658 DB 00000000b59 DB 00000000b60 DB 00111100b61 DB 01000010b62 DB 01111110b63 DB 11001011b64 DB 01000110b65 DB 01001010b66 DB 11000111b67 DB 01001010b68 DB 11000111b69 DB 01111110b70 DB 00000000b71 DB 11100111b72 DB 00100100b73 DB 00100100b75 DB 11100111b76 DB 00100100b77 DB 00100100b78 DB 00111100b79 DB 00000000b80 DB 00000000b81 DB 00000000b82 DB 00000000b84 93 102 112 DB 00000000b113 DB 00000000b114 DB 00000000b115 DB 00000000b117 DB 01100000b118 DB 10010000b119 DB 00010000b120 DB 00100000b122 DB 00100000b123 DB 10011000b124 DB 00000100b125 DB 01010100b127 DB 00101100b128 DB 10011000b129 DB 01010000b130 DB 01110000b132 DB 01110000b133 DB 11110000b134 DB 01100000b135 DB 00000000b137 DB 00000000b138 DB 00000000b139 DB 00000000b140 DB 00000000b142 151 160 169170Apps/Settings/Header.s98Settings_Data:99 Apps/Settings/Data.s12.SETTINGS_TABS:4 db TILE_LINE_TOP_LEFT6 db TILE_LINE_HORIZONTAL7 db TILE_LINE_HORIZONTAL8 db TILE_LINE_HORIZONTAL9 db TILE_LINE_HORIZONTAL10 db TILE_LINE_HORIZONTAL12 db TILE_LINE_TOP_MID14 db TILE_LINE_HORIZONTAL15 db TILE_LINE_HORIZONTAL16 db TILE_LINE_HORIZONTAL17 db TILE_LINE_HORIZONTAL18 db TILE_LINE_HORIZONTAL20 db TILE_LINE_TOP_MID22 db TILE_LINE_HORIZONTAL23 db TILE_LINE_HORIZONTAL24 db TILE_LINE_HORIZONTAL25 db TILE_LINE_HORIZONTAL27 db TILE_LINE_TOP_RIGHT2830 db TILE_LINE_VERTICAL32 db TILE_FONT_LOWERCASE_A + 21 33 db TILE_FONT_LOWERCASE_A + 8 34 db TILE_FONT_LOWERCASE_A + 3 35 db TILE_FONT_LOWERCASE_A + 4 36 db TILE_FONT_LOWERCASE_A + 14 38 db TILE_LINE_VERTICAL40 db TILE_FONT_LOWERCASE_A + 12 41 db TILE_FONT_LOWERCASE_A + 14 42 db TILE_FONT_LOWERCASE_A + 20 43 db TILE_FONT_LOWERCASE_A + 18 44 db TILE_FONT_LOWERCASE_A + 4 46 db TILE_LINE_VERTICAL48 db TILE_FONT_LOWERCASE_A + 19 49 db TILE_FONT_LOWERCASE_A + 8 50 db TILE_FONT_LOWERCASE_A + 12 51 db TILE_FONT_LOWERCASE_A + 4 53 db TILE_LINE_VERTICAL5557 db TILE_LINE_VERTICAL59 db TILE_EMPTY60 db TILE_EMPTY61 db TILE_EMPTY62 db TILE_EMPTY63 db TILE_EMPTY65 db TILE_EMPTY67 db TILE_EMPTY68 db TILE_EMPTY69 db TILE_EMPTY70 db TILE_EMPTY71 db TILE_EMPTY73 db TILE_EMPTY75 db TILE_EMPTY76 db TILE_EMPTY77 db TILE_EMPTY78 db TILE_EMPTY80 db TILE_LINE_VERTICAL8284 db TILE_LINE_VERTICAL86 db TILE_EMPTY87 db TILE_EMPTY88 db TILE_EMPTY89 db TILE_EMPTY90 db TILE_EMPTY92 db TILE_EMPTY94 db TILE_EMPTY95 db TILE_EMPTY96 db TILE_EMPTY97 db TILE_EMPTY98 db TILE_EMPTY100 db TILE_EMPTY102 db TILE_EMPTY103 db TILE_EMPTY104 db TILE_EMPTY105 db TILE_EMPTY107 db TILE_LINE_VERTICAL109111 db TILE_LINE_VERTICAL113 db TILE_EMPTY114 db TILE_EMPTY115 db TILE_EMPTY116 db TILE_EMPTY117 db TILE_EMPTY119 db TILE_EMPTY121 db TILE_EMPTY122 db TILE_EMPTY123 db TILE_EMPTY124 db TILE_EMPTY125 db TILE_EMPTY127 db TILE_EMPTY129 db TILE_EMPTY130 db TILE_EMPTY131 db TILE_EMPTY132 db TILE_EMPTY134 db TILE_LINE_VERTICAL136138 db TILE_LINE_VERTICAL140 db TILE_EMPTY141 db TILE_EMPTY142 db TILE_EMPTY143 db TILE_EMPTY144 db TILE_EMPTY146 db TILE_EMPTY148 db TILE_EMPTY149 db TILE_EMPTY150 db TILE_EMPTY151 db TILE_EMPTY152 db TILE_EMPTY154 db TILE_EMPTY156 db TILE_EMPTY157 db TILE_EMPTY158 db TILE_EMPTY159 db TILE_EMPTY161 db TILE_LINE_VERTICAL163165 db TILE_LINE_VERTICAL167 db TILE_EMPTY168 db TILE_EMPTY169 db TILE_EMPTY170 db TILE_EMPTY171 db TILE_EMPTY173 db TILE_EMPTY175 db TILE_EMPTY176 db TILE_EMPTY177 db TILE_EMPTY178 db TILE_EMPTY179 db TILE_EMPTY181 db TILE_EMPTY183 db TILE_EMPTY184 db TILE_EMPTY185 db TILE_EMPTY186 db TILE_EMPTY188 db TILE_LINE_VERTICAL190192 db TILE_LINE_VERTICAL194 db TILE_EMPTY195 db TILE_EMPTY196 db TILE_EMPTY197 db TILE_EMPTY198 db TILE_EMPTY200 db TILE_EMPTY202 db TILE_EMPTY203 db TILE_EMPTY204 db TILE_EMPTY205 db TILE_EMPTY206 db TILE_EMPTY208 db TILE_EMPTY210 db TILE_EMPTY211 db TILE_EMPTY212 db TILE_EMPTY213 db TILE_EMPTY215 db TILE_LINE_VERTICAL217219 db TILE_LINE_VERTICAL221 db TILE_EMPTY222 db TILE_EMPTY223 db TILE_EMPTY224 db TILE_EMPTY225 db TILE_EMPTY227 db TILE_EMPTY229 db TILE_EMPTY230 db TILE_EMPTY231 db TILE_EMPTY232 db TILE_EMPTY233 db TILE_EMPTY235 db TILE_EMPTY237 db TILE_EMPTY238 db TILE_EMPTY239 db TILE_EMPTY240 db TILE_EMPTY242 db TILE_LINE_VERTICAL244246 db TILE_LINE_VERTICAL248 db TILE_EMPTY249 db TILE_EMPTY250 db TILE_EMPTY251 db TILE_EMPTY252 db TILE_EMPTY254 db TILE_EMPTY256 db TILE_EMPTY257 db TILE_EMPTY258 db TILE_EMPTY259 db TILE_EMPTY260 db TILE_EMPTY262 db TILE_EMPTY264 db TILE_EMPTY265 db TILE_EMPTY266 db TILE_EMPTY267 db TILE_EMPTY269 db TILE_LINE_VERTICAL271273274 db TILE_LINE_BOTTOM_LEFT276 db TILE_LINE_HORIZONTAL277 db TILE_LINE_HORIZONTAL278 db TILE_LINE_HORIZONTAL279 db TILE_LINE_HORIZONTAL280 db TILE_LINE_HORIZONTAL282 db TILE_LINE_HORIZONTAL284 db TILE_LINE_HORIZONTAL285 db TILE_LINE_HORIZONTAL286 db TILE_LINE_HORIZONTAL287 db TILE_LINE_HORIZONTAL288 db TILE_LINE_HORIZONTAL290 db TILE_LINE_HORIZONTAL292 db TILE_LINE_HORIZONTAL293 db TILE_LINE_HORIZONTAL294 db TILE_LINE_HORIZONTAL295 db TILE_LINE_HORIZONTAL297 db TILE_LINE_BOTTOM_RIGHT299301304310312318320325328330333339341347349354357359.CURRENT_TAB_VIDEO_TILES:360 db TILE_LINE_VERTICAL362 db TILE_EMPTY363 db TILE_EMPTY364 db TILE_EMPTY365 db TILE_EMPTY366 db TILE_EMPTY368 db TILE_LINE_BOTTOM_LEFT370 db TILE_LINE_HORIZONTAL371 db TILE_LINE_HORIZONTAL372 db TILE_LINE_HORIZONTAL373 db TILE_LINE_HORIZONTAL374 db TILE_LINE_HORIZONTAL376 db TILE_LINE_BOTTOM_MID378 db TILE_LINE_HORIZONTAL379 db TILE_LINE_HORIZONTAL380 db TILE_LINE_HORIZONTAL381 db TILE_LINE_HORIZONTAL383 db TILE_LINE_MID_RIGHT387389.CURRENT_TAB_MOUSE_TILES:390 db TILE_LINE_MID_LEFT392 db TILE_LINE_HORIZONTAL393 db TILE_LINE_HORIZONTAL394 db TILE_LINE_HORIZONTAL395 db TILE_LINE_HORIZONTAL396 db TILE_LINE_HORIZONTAL398 db TILE_LINE_BOTTOM_RIGHT400 db TILE_EMPTY401 db TILE_EMPTY402 db TILE_EMPTY403 db TILE_EMPTY404 db TILE_EMPTY406 db TILE_LINE_BOTTOM_LEFT408 db TILE_LINE_HORIZONTAL409 db TILE_LINE_HORIZONTAL410 db TILE_LINE_HORIZONTAL411 db TILE_LINE_HORIZONTAL413 db TILE_LINE_MID_RIGHT416418.CURRENT_TAB_TIME_TILES:419 db TILE_LINE_MID_LEFT421 db TILE_LINE_HORIZONTAL422 db TILE_LINE_HORIZONTAL423 db TILE_LINE_HORIZONTAL424 db TILE_LINE_HORIZONTAL425 db TILE_LINE_HORIZONTAL427 db TILE_LINE_BOTTOM_MID429 db TILE_LINE_HORIZONTAL430 db TILE_LINE_HORIZONTAL431 db TILE_LINE_HORIZONTAL432 db TILE_LINE_HORIZONTAL433 db TILE_LINE_HORIZONTAL435 db TILE_LINE_BOTTOM_RIGHT437 db TILE_EMPTY438 db TILE_EMPTY439 db TILE_EMPTY440 db TILE_EMPTY442 db TILE_LINE_VERTICAL444446.LABEL_COMBO_SCREEN_SAVER:447 db TILE_FONT_LOWERCASE_S448 db TILE_FONT_LOWERCASE_C449 db TILE_FONT_LOWERCASE_R450 db TILE_FONT_LOWERCASE_E451 db TILE_FONT_LOWERCASE_E452 db TILE_FONT_LOWERCASE_N453 db TILE_EMPTY454 db TILE_FONT_LOWERCASE_S455 db TILE_FONT_LOWERCASE_A456 db TILE_FONT_LOWERCASE_V457 db TILE_FONT_LOWERCASE_E458 db TILE_FONT_LOWERCASE_R460462.COMBO_SCREEN_SAVER:463 db TILE_LINE_TOP_LEFT465 db TILE_LINE_HORIZONTAL466 db TILE_LINE_HORIZONTAL467 db TILE_LINE_HORIZONTAL468 db TILE_LINE_HORIZONTAL469 db TILE_LINE_HORIZONTAL470 db TILE_LINE_HORIZONTAL471 db TILE_LINE_HORIZONTAL472 db TILE_LINE_HORIZONTAL474 db TILE_LINE_TOP_MID476 db TILE_LINE_HORIZONTAL478 db TILE_LINE_TOP_RIGHT480 481 db TILE_LINE_VERTICAL483 db TILE_FONT_LOWERCASE_A + 3 484 db TILE_FONT_LOWERCASE_A + 8 485 db TILE_FONT_LOWERCASE_A + 18 486 db TILE_FONT_LOWERCASE_A + 0 487 db TILE_FONT_LOWERCASE_A + 1 488 db TILE_FONT_LOWERCASE_A + 11 489 db TILE_FONT_LOWERCASE_A + 4 490 db TILE_FONT_LOWERCASE_A + 3 492 db TILE_LINE_VERTICAL494 db TILE_ARROW_DOWN496 db TILE_LINE_VERTICAL498 499 db TILE_LINE_BOTTOM_LEFT501 db TILE_LINE_HORIZONTAL502 db TILE_LINE_HORIZONTAL503 db TILE_LINE_HORIZONTAL504 db TILE_LINE_HORIZONTAL505 db TILE_LINE_HORIZONTAL506 db TILE_LINE_HORIZONTAL507 db TILE_LINE_HORIZONTAL508 db TILE_LINE_HORIZONTAL510 db TILE_LINE_BOTTOM_MID512 db TILE_LINE_HORIZONTAL514 db TILE_LINE_BOTTOM_RIGHT516 518520.CHECKBOX_SHOW_TICKS:521 db TILE_CHECKBOX_UNCHECKED522 db TILE_FONT_LOWERCASE_S523 db TILE_FONT_LOWERCASE_H524 db TILE_FONT_LOWERCASE_O525 db TILE_FONT_LOWERCASE_W526 db TILE_EMPTY527 db TILE_FONT_LOWERCASE_T528 db TILE_FONT_LOWERCASE_I529 db TILE_FONT_LOWERCASE_C530 db TILE_FONT_LOWERCASE_K531 db TILE_FONT_LOWERCASE_S533535SETTINGS_VARS:536 .TAB_SELECTED: equ 0537 .CHECKBOX_SHOW_TICKS_VALUE: equ 1539SETTINGS_TABS_VALUES:540 .TAB_VIDEO: equ 0541 .TAB_MOUSE: equ 1542 .TAB_TIME: equ 2Apps/Settings/Header.s101Settings.EndProgramData: 103System\Main.s43 Apps/TicTacToe/Header.s1TicTacToe:34.Header:6.processId: db 255 7.windowState: db WINDOW_STATE.RESTORED8.x: db 29.y: db 210.width: db 1411.height: db 1512.minWidth: db 1413.minHeight: db 1515.windowTitle:16 db TILE_FONT_REVERSED_LOWERCASE_T17 db TILE_FONT_REVERSED_LOWERCASE_I18 db TILE_FONT_REVERSED_LOWERCASE_C19 db TILE_FONT_REVERSED_LOWERCASE_T20 db TILE_FONT_REVERSED_LOWERCASE_A21 db TILE_FONT_REVERSED_LOWERCASE_C22 db TILE_FONT_REVERSED_LOWERCASE_T23 db TILE_FONT_REVERSED_LOWERCASE_O24 db TILE_FONT_REVERSED_LOWERCASE_E25 db 0 26 db 027 db 028 db 029 db 030 db 031 db 032.taskbarTitle:33 db TILE_FONT_REVERSED_LOWERCASE_T34 db TILE_FONT_REVERSED_LOWERCASE_I35 db TILE_FONT_REVERSED_LOWERCASE_C36 db TILE_EMPTY_BLACK37.iconTitle:38 db TILE_FONT_LOWERCASE_T39 db TILE_FONT_LOWERCASE_I40 db TILE_FONT_LOWERCASE_C41 db TILE_EMPTY42 db TILE_FONT_LOWERCASE_T43 db TILE_FONT_LOWERCASE_A44 db TILE_FONT_LOWERCASE_C46.isFixedSize: db 047.vertScrollbarEnabled: db 048.vertScrollbarPosition: db 051.openAddr: dw TicTacToe_Open52.workAddr: dw TicTacToe_Work53.drawAddr: dw TicTacToe_Draw54.clickAddr: dw TicTacToe_Click55.getFocusAddr: dw TicTacToe_GetFocus56.loseFocusAddr: dw TicTacToe_LoseFocus57.closeAddr: dw TicTacToe_Close59.iconAddr: dw TicTacToe_Icon61.ramSize: dw 1024 6465TicTacToe.StartProgramCode:67TicTacToe_Open:68 Apps/TicTacToe/Open.s15 xor a6 ld hl, TicTacToe_Data.TILE_X_pattern_07 ld de, TicTacToe_Data.TILE_X_colors8 call SET_CUSTOM_TILE10 ld a, 111 ld hl, TicTacToe_Data.TILE_X_pattern_112 ld de, TicTacToe_Data.TILE_X_colors13 call SET_CUSTOM_TILE15 ld a, 216 ld hl, TicTacToe_Data.TILE_X_pattern_217 ld de, TicTacToe_Data.TILE_X_colors18 call SET_CUSTOM_TILE20 ld a, 321 ld hl, TicTacToe_Data.TILE_X_pattern_322 ld de, TicTacToe_Data.TILE_X_colors23 call SET_CUSTOM_TILE27 ld a, 428 ld hl, TicTacToe_Data.TILE_O_pattern_029 ld de, TicTacToe_Data.TILE_O_colors30 call SET_CUSTOM_TILE32 ld a, 533 ld hl, TicTacToe_Data.TILE_O_pattern_134 ld de, TicTacToe_Data.TILE_O_colors35 call SET_CUSTOM_TILE37 ld a, 638 ld hl, TicTacToe_Data.TILE_O_pattern_239 ld de, TicTacToe_Data.TILE_O_colors40 call SET_CUSTOM_TILE42 ld a, 743 ld hl, TicTacToe_Data.TILE_O_pattern_344 ld de, TicTacToe_Data.TILE_O_colors45 call SET_CUSTOM_TILE49 50 xor a51 ld b, 952 push iy53 .loop_1:54 ld (iy + TICTACTOE_VARS.PLAYFIELD), a55 inc iy56 djnz .loop_157 pop iy60 ld a, 161 ld (iy + TICTACTOE_VARS.CURRENT_PLAYER), a64 72 79 86 ret87Apps/TicTacToe/Header.s70TicTacToe_Work:71 Apps/TicTacToe/Work.s15 ret6Apps/TicTacToe/Header.s73TicTacToe_Draw:74 Apps/TicTacToe/Draw.s15 call GET_USEFUL_WINDOW_BASE_NAMTBL7 ex de, hl9 10 ld hl, TicTacToe_Data.PLAYFIELD_TILES 11 ld b, 8 12 ld c, 10 13 call DRAW_ON_WINDOW_USEFUL_AREA15 18 22 26 27 call GET_USEFUL_WINDOW_BASE_NAMTBL28 ld de, 64 29 add hl, de 30 ld c, 3 31 push iy32 .loop_2:33 push hl34 ld b, 3 35 .loop_1:36 push hl37 ld a, (iy + TICTACTOE_VARS.PLAYFIELD)38 or a39 jp z, .next41 cp 142 jp z, .draw_X44 cp 245 jp z, .draw_O47 .next:48 pop hl50 inc iy51 ld de, 352 add hl, de53 djnz .loop_154 pop hl55 ld de, 32 * 3 56 add hl, de57 dec c58 jp nz, .loop_259 pop iy62 ret64.draw_O:65 ld a, (ix + PROCESS_STRUCT_IX.vramStartTile)66 add 467 jp .drawPiece69.draw_X:71 ld a, (ix + PROCESS_STRUCT_IX.vramStartTile)72 jp .drawPiece74.drawPiece:75 push af76 call BIOS_SETWRT77 pop af79 out (PORT_0), a81 ld de, 3282 add hl, de 84 inc a85 out (PORT_0), a88 push af89 call BIOS_SETWRT90 pop af92 94 inc a95 out (PORT_0), a97 nop98 nop99 nop100 inc a101 out (PORT_0), a103 jp .nextApps/TicTacToe/Header.s76TicTacToe_Click:77 Apps/TicTacToe/Click.s16 8 ld a, (iy + TICTACTOE_VARS.CURRENT_PLAYER)9 ld b, a14 ld a, l16 17 or a18 jp z, .isCol_019 cp 120 jp z, .isCol_022 23 cp 324 jp z, .isCol_125 cp 426 jp z, .isCol_128 29 cp 630 jp z, .isCol_231 cp 732 jp z, .isCol_234 ret36.isCol_0:38 ld a, h40 41 cp 242 jp z, .isCel_0_043 cp 344 jp z, .isCel_0_046 47 cp 548 jp z, .isCel_0_149 cp 650 jp z, .isCel_0_152 53 cp 854 jp z, .isCel_0_255 cp 956 jp z, .isCel_0_258 ret60.isCol_1:62 ld a, h64 65 cp 266 jp z, .isCel_1_067 cp 368 jp z, .isCel_1_070 71 cp 572 jp z, .isCel_1_173 cp 674 jp z, .isCel_1_176 77 cp 878 jp z, .isCel_1_279 cp 980 jp z, .isCel_1_282 ret84.isCol_2:86 ld a, h88 89 cp 290 jp z, .isCel_2_091 cp 392 jp z, .isCel_2_094 95 cp 596 jp z, .isCel_2_197 cp 698 jp z, .isCel_2_1100 101 cp 8102 jp z, .isCel_2_2103 cp 9104 jp z, .isCel_2_2106 ret109.isCel_0_0:110 ld de, TICTACTOE_VARS.PLAYFIELD + 0111 jp .setCell113.isCel_0_1:114 ld de, TICTACTOE_VARS.PLAYFIELD + 3115 jp .setCell117.isCel_0_2:118 ld de, TICTACTOE_VARS.PLAYFIELD + 6119 jp .setCell121123.isCel_1_0:124 ld de, TICTACTOE_VARS.PLAYFIELD + 1125 jp .setCell127.isCel_1_1:128 ld de, TICTACTOE_VARS.PLAYFIELD + 4129 jp .setCell131.isCel_1_2:132 ld de, TICTACTOE_VARS.PLAYFIELD + 7133 jp .setCell135137.isCel_2_0:138 ld de, TICTACTOE_VARS.PLAYFIELD + 2139 jp .setCell141.isCel_2_1:142 ld de, TICTACTOE_VARS.PLAYFIELD + 5143 jp .setCell145.isCel_2_2:146 ld de, TICTACTOE_VARS.PLAYFIELD + 8147 jp .setCell150.setCell:151 push iy 152 pop hl154 155 add hl, de156 157 158 ld a, (hl)159 or a160 ret nz162 ld (hl), b166 167 ld a, (iy + TICTACTOE_VARS.CURRENT_PLAYER)168 169 cp 1170 jp z, .setPlayer_2172173 ld a, 1174 jp .continue176.setPlayer_2:177 ld a, 2178.continue:179 ld (iy + TICTACTOE_VARS.CURRENT_PLAYER), a185 186 ld e, (ix + PROCESS_STRUCT_IX.drawAddr) 187 ld d, (ix + PROCESS_STRUCT_IX.drawAddr + 1) 188 call JP_DE190 ret191Apps/TicTacToe/Header.s79TicTacToe_GetFocus:80 Apps/TicTacToe/GetFocus.s15 6 7 retApps/TicTacToe/Header.s82TicTacToe_LoseFocus:83 Apps/TicTacToe/LoseFocus.s15 6 7 retApps/TicTacToe/Header.s85TicTacToe_Close:86 Apps/TicTacToe/Close.s15 7 retApps/TicTacToe/Header.s88TicTacToe.EndProgramCode: 9293TicTacToe.StartProgramData:95TicTacToe_Icon:96 Apps/TicTacToe/Icon.s12 DB 00000001b3 DB 01000101b4 DB 00101001b5 DB 00010001b6 DB 00101001b7 DB 01000101b8 DB 00000001b9 DB 11111111b11 DB 00000001b12 DB 00000001b13 DB 00000001b14 DB 00000001b15 DB 00000001b16 DB 00000001b17 DB 00000001b18 DB 11111111b20 DB 00000001b21 DB 00000001b22 DB 00000001b23 DB 00000001b24 DB 00000001b25 DB 00000001b26 DB 00000001b27 DB 00000000b3032 DB 00000001b33 DB 00000001b34 DB 00000001b35 DB 00000001b36 DB 00000001b37 DB 00000001b38 DB 00000001b39 DB 11111111b41 DB 00000001b42 DB 00111001b43 DB 01000101b44 DB 01000101b45 DB 01000101b46 DB 00111001b47 DB 00000001b48 DB 11111111b50 DB 00000001b51 DB 01000101b52 DB 00101001b53 DB 00010001b54 DB 00101001b55 DB 01000101b56 DB 00000001b57 DB 00000000b5961 DB 00000000b62 DB 00000000b63 DB 00000000b64 DB 00000000b65 DB 00000000b66 DB 00000000b67 DB 00000000b68 DB 11111110b70 DB 00000000b71 DB 00000000b72 DB 00000000b73 DB 00000000b74 DB 00000000b75 DB 00000000b76 DB 00000000b77 DB 11111110b79 DB 00000000b80 DB 00000000b81 DB 00000000b82 DB 00000000b83 DB 00000000b84 DB 00000000b85 DB 00000000b86 DB 00000000b8889Apps/TicTacToe/Header.s98TicTacToe_Data:99 Apps/TicTacToe/Data.s12.PLAYFIELD_TILES:4 db TILE_EMPTY, TILE_EMPTY, TILE_EMPTY, TILE_EMPTY, TILE_EMPTY, TILE_EMPTY, TILE_EMPTY, TILE_EMPTY5 db TILE_EMPTY, TILE_EMPTY, TILE_EMPTY, TILE_EMPTY, TILE_EMPTY, TILE_EMPTY, TILE_EMPTY, TILE_EMPTY7 db TILE_EMPTY, TILE_EMPTY, TILE_LINE_VERTICAL, TILE_EMPTY, TILE_EMPTY, TILE_LINE_VERTICAL, TILE_EMPTY, TILE_EMPTY8 db TILE_EMPTY, TILE_EMPTY, TILE_LINE_VERTICAL, TILE_EMPTY, TILE_EMPTY, TILE_LINE_VERTICAL, TILE_EMPTY, TILE_EMPTY10 db TILE_LINE_HORIZONTAL, TILE_LINE_HORIZONTAL, TILE_LINE_CROSS, TILE_LINE_HORIZONTAL, TILE_LINE_HORIZONTAL, TILE_LINE_CROSS, TILE_LINE_HORIZONTAL, TILE_LINE_HORIZONTAL12 db TILE_EMPTY, TILE_EMPTY, TILE_LINE_VERTICAL, TILE_EMPTY, TILE_EMPTY, TILE_LINE_VERTICAL, TILE_EMPTY, TILE_EMPTY13 db TILE_EMPTY, TILE_EMPTY, TILE_LINE_VERTICAL, TILE_EMPTY, TILE_EMPTY, TILE_LINE_VERTICAL, TILE_EMPTY, TILE_EMPTY15 db TILE_LINE_HORIZONTAL, TILE_LINE_HORIZONTAL, TILE_LINE_CROSS, TILE_LINE_HORIZONTAL, TILE_LINE_HORIZONTAL, TILE_LINE_CROSS, TILE_LINE_HORIZONTAL, TILE_LINE_HORIZONTAL17 db TILE_EMPTY, TILE_EMPTY, TILE_LINE_VERTICAL, TILE_EMPTY, TILE_EMPTY, TILE_LINE_VERTICAL, TILE_EMPTY, TILE_EMPTY18 db TILE_EMPTY, TILE_EMPTY, TILE_LINE_VERTICAL, TILE_EMPTY, TILE_EMPTY, TILE_LINE_VERTICAL, TILE_EMPTY, TILE_EMPTY20.TILE_X_pattern_0: 21 db 11000000 b22 db 11100000 b23 db 01110000 b24 db 00111000 b25 db 00011100 b26 db 00001110 b27 db 00000111 b28 db 00000011 b30.TILE_X_pattern_1: 31 db 00000011 b32 db 00000111 b33 db 00001110 b34 db 00011100 b35 db 00111000 b36 db 01110000 b37 db 11100000 b38 db 11000000 b40.TILE_X_pattern_2: 41 db 00000011 b42 db 00000111 b43 db 00001110 b44 db 00011100 b45 db 00111000 b46 db 01110000 b47 db 11100000 b48 db 11000000 b50.TILE_X_pattern_3: 51 db 11000000 b52 db 11100000 b53 db 01110000 b54 db 00111000 b55 db 00011100 b56 db 00001110 b57 db 00000111 b58 db 00000011 b60.TILE_X_colors:61 db 0x4f62 db 0x4f63 db 0x4f64 db 0x4f65 db 0x4f66 db 0x4f67 db 0x4f68 db 0x4f7072.TILE_O_pattern_0:73 db 00000011 b74 db 00001111 b75 db 00011100 b76 db 00110000 b77 db 01100000 b78 db 01100000 b79 db 11000000 b80 db 11000000 b82.TILE_O_pattern_1:83 db 11000000 b84 db 11110000 b85 db 00111000 b86 db 00001100 b87 db 00000110 b88 db 00000110 b89 db 00000011 b90 db 00000011 b92.TILE_O_pattern_2:93 db 11000000 b94 db 11000000 b95 db 01100000 b96 db 01100000 b97 db 00110000 b98 db 00011100 b99 db 00001111 b100 db 00000011 b102.TILE_O_pattern_3:103 db 00000011 b104 db 00000011 b105 db 00000110 b106 db 00000110 b107 db 00001100 b108 db 00111000 b109 db 11110000 b110 db 11000000 b112.TILE_O_colors:113 db 0x8f114 db 0x8f115 db 0x8f116 db 0x8f117 db 0x8f118 db 0x8f119 db 0x8f120 db 0x8f123125TICTACTOE_VARS:126 .PLAYFIELD: equ 0 127 .CURRENT_PLAYER: equ 9128Apps/TicTacToe/Header.s101TicTacToe.EndProgramData: 103System\Main.s44 Apps/Tetra/Header.s1Tetra:34.Header:6.processId: db 255 7.windowState: db WINDOW_STATE.RESTORED8.x: db 29.y: db 210.width: db 1411.height: db 2212.minWidth: db 1413.minHeight: db 2215.windowTitle:16 db TILE_FONT_REVERSED_LOWERCASE_T17 db TILE_FONT_REVERSED_LOWERCASE_E18 db TILE_FONT_REVERSED_LOWERCASE_T19 db TILE_FONT_REVERSED_LOWERCASE_R20 db TILE_FONT_REVERSED_LOWERCASE_A21 db 0 22 db 023 db 024 db 025 db 026 db 027 db 028 db 029 db 030 db 031 db 032.taskbarTitle:33 db TILE_FONT_REVERSED_LOWERCASE_T34 db TILE_FONT_REVERSED_LOWERCASE_E35 db TILE_FONT_REVERSED_LOWERCASE_T36 db TILE_FONT_REVERSED_LOWERCASE_R37.iconTitle:38 db TILE_EMPTY39 db TILE_FONT_LOWERCASE_T40 db TILE_FONT_LOWERCASE_E41 db TILE_FONT_LOWERCASE_T42 db TILE_FONT_LOWERCASE_R43 db TILE_FONT_LOWERCASE_A44 db TILE_EMPTY46.isFixedSize: db 047.vertScrollbarEnabled: db 048.vertScrollbarPosition: db 051.openAddr: dw Tetra_Open52.workAddr: dw Tetra_Work53.drawAddr: dw Tetra_Draw54.clickAddr: dw Tetra_Click55.getFocusAddr: dw Tetra_GetFocus56.loseFocusAddr: dw Tetra_LoseFocus57.closeAddr: dw Tetra_Close59.iconAddr: dw Tetra_Icon61.ramSize: dw 1024 6465Tetra.StartProgramCode:67Tetra_Open:68 Apps/Tetra/Open.s15 6 ld a, (BIOS_JIFFY)7 or 0x808 ld (Seed), a10 11 xor a12 ld hl, Tetra_Data.TILE_pattern13 ld de, Tetra_Data.TILE_LIGHT_BLUE_colors14 call SET_CUSTOM_TILE16 ld a, 117 ld hl, Tetra_Data.TILE_pattern18 ld de, Tetra_Data.TILE_RED_colors19 call SET_CUSTOM_TILE21 ld a, 222 ld hl, Tetra_Data.TILE_pattern23 ld de, Tetra_Data.TILE_YELLOW_colors24 call SET_CUSTOM_TILE26 ld a, 327 ld hl, Tetra_Data.TILE_pattern28 ld de, Tetra_Data.TILE_PURPLE_colors29 call SET_CUSTOM_TILE31 ld a, 432 ld hl, Tetra_Data.TILE_pattern33 ld de, Tetra_Data.TILE_GRAY_colors34 call SET_CUSTOM_TILE36 ld a, 537 ld hl, Tetra_Data.TILE_pattern38 ld de, Tetra_Data.TILE_GREEN_colors39 call SET_CUSTOM_TILE41 ld a, 642 ld hl, Tetra_Data.TILE_pattern43 ld de, Tetra_Data.TILE_BLUE_colors44 call SET_CUSTOM_TILE46 47 ld de, TETRA_VARS.PLAYFIELD48 push iy 49 pop hl50 add hl, de51 push hl52 ld de, TETRA_VARS.PLAYFIELD_BUFFER53 push iy 54 pop hl55 add hl, de56 ex de, hl57 pop hl58 xor a59 ld b, TETRA_CONSTANTS.PLAYFIELD_WIDTH * TETRA_CONSTANTS.PLAYFIELD_HEIGHT60.loop_1:61 ld (hl), a62 ld (de), a63 inc hl64 inc de65 djnz .loop_169 78 call .LoadRandomPiece81 82 xor a83 ld (iy + TETRA_VARS.COUNTER), a85 ret8788.LoadRandomPiece:90 91 call RandomNumber92 and 0000 0111 b 93 or a 94 jp z, .LoadRandomPiece96 cp 197 jp z, .loadPiece_Square99 cp 2100 jp z, .loadPiece_I102 cp 3103 jp z, .loadPiece_L105 cp 4106 jp z, .loadPiece_J108 cp 5109 jp z, .loadPiece_T111 cp 6112 jp z, .loadPiece_Z114 cp 7115 jp z, .loadPiece_S117 120 ret122.loadPiece_Square:123 ld c, TETRA_CONSTANTS.PIECE_TYPE_SQUARE124 ld hl, Tetra_Data.PIECE_SQUARE125 ld a, (ix + PROCESS_STRUCT_IX.vramStartTile) 126 call .LoadPiece127 ret128 129.loadPiece_I:130 ld c, TETRA_CONSTANTS.PIECE_TYPE_I131 ld hl, Tetra_Data.PIECE_I132 ld a, (ix + PROCESS_STRUCT_IX.vramStartTile)133 inc a 134 call .LoadPiece135 ret137.loadPiece_L:138 ld c, TETRA_CONSTANTS.PIECE_TYPE_L139 ld hl, Tetra_Data.PIECE_L140 ld a, (ix + PROCESS_STRUCT_IX.vramStartTile)141 add 2 142 call .LoadPiece143 ret145.loadPiece_J:146 ld c, TETRA_CONSTANTS.PIECE_TYPE_J147 ld hl, Tetra_Data.PIECE_J148 ld a, (ix + PROCESS_STRUCT_IX.vramStartTile)149 add 3 150 call .LoadPiece151 ret153.loadPiece_T:154 ld c, TETRA_CONSTANTS.PIECE_TYPE_T155 ld hl, Tetra_Data.PIECE_T156 ld a, (ix + PROCESS_STRUCT_IX.vramStartTile)157 add 4 158 call .LoadPiece159 ret161.loadPiece_Z:162 ld c, TETRA_CONSTANTS.PIECE_TYPE_Z163 ld hl, Tetra_Data.PIECE_Z164 ld a, (ix + PROCESS_STRUCT_IX.vramStartTile)165 add 5 166 call .LoadPiece167 ret169.loadPiece_S:170 ld c, TETRA_CONSTANTS.PIECE_TYPE_S171 ld hl, Tetra_Data.PIECE_S172 ld a, (ix + PROCESS_STRUCT_IX.vramStartTile)173 add 6 174 call .LoadPiece175 ret179181185.LoadPiece:187 188 push hl, bc, iy189 190 push iy191 pop hl192 ld de, TETRA_VARS.CURRENT_PIECE_TEMP193 add hl, de195 ld c, 0196 ld b, 16197 .LoadPiece_loop:198 ld (iy + TETRA_VARS.CURRENT_PIECE), c199 ld (hl), c200 inc iy201 inc hl202 djnz .LoadPiece_loop203 pop iy, bc, hl205 ld (iy + TETRA_VARS.CURRENT_PIECE_TYPE), c206 ld c, a208 push hl209 push iy 210 pop hl211 ld de, TETRA_VARS.CURRENT_PIECE212 add hl, de213 ex de, hl214 pop hl216 ld b, 16217.loop:218 ld a, (hl)219 or a220 jp z, .next222224228229 ld a, c231.next:232 ld (de), a233 inc hl234 inc de235 djnz .loop238 239 ld a, 2240 ld (iy + TETRA_VARS.PIECE_X), a241 242 ld a, 0243 ld (iy + TETRA_VARS.PIECE_Y), a245 retApps/Tetra/Header.s70Tetra_Work:71 Apps/Tetra/Work.s16 9 ld a, (BIOS_NEWKEY + 8)11 push af12 13 bit 7, a 14 jp z, .keyPressed_Right16 bit 4, a 17 jp z, .keyPressed_Left19 bit 5, a 20 jp z, .keyPressed_Up22 25 .continue:27 pop af29 30 ld (iy + TETRA_VARS.OLD_KEYBOARD_LINE_8), a32 36 37 ld a, (iy + TETRA_VARS.COUNTER)38 inc a39 ld (iy + TETRA_VARS.COUNTER), a40 cp 30 41 jp nz, .draw43 xor a44 ld (iy + TETRA_VARS.COUNTER), a46 47 ld d, (iy + TETRA_VARS.PIECE_X)48 ld e, (iy + TETRA_VARS.PIECE_Y)49 inc e50 ld bc, TETRA_VARS.CURRENT_PIECE51 call .isPiecePositionValid52 53 jp z, .releasePiece55 inc (iy + TETRA_VARS.PIECE_Y)57.draw:58 59 ld e, (ix + PROCESS_STRUCT_IX.drawAddr) 60 ld d, (ix + PROCESS_STRUCT_IX.drawAddr + 1) 61 call JP_DE63 ret6567.releasePiece:69 call Tetra_Draw.ConvertPiece_XY_ToLinear71 72 push hl73 ld de, TETRA_VARS.PLAYFIELD74 push iy 75 pop hl76 add hl, de77 pop de78 add hl, de80 call Tetra_Draw.PutPieceIntoPlayfield82 83 call .CheckFullLines84 call .CheckFullLines85 call .CheckFullLines86 call .CheckFullLines88 call Tetra_Open.LoadRandomPiece90 93 jp .draw9597.CheckFullLines:98 99 push iy100 pop hl101 ld bc, TETRA_VARS.PLAYFIELD102 add hl, bc103 104 105 push hl106 111 ld de, TETRA_CONSTANTS.PLAYFIELD_WIDTH * TETRA_CONSTANTS.PLAYFIELD_HEIGHT112 add hl, de113 ex de, hl114 pop hl116 ld (OS.tempWord_3), de 118.nextLine_10:120 ld de, (OS.tempWord_3) 122 123 call BIOS_DCOMPR 124 ret nc 126 ld c, 0 127 ld b, TETRA_CONSTANTS.PLAYFIELD_WIDTH128.loop_2:129 ld a, (hl)130 or a131 jp z, .emptyCell 133 inc c 135.emptyCell:137 inc hl138 djnz .loop_2140 141 ld a, c142 cp TETRA_CONSTANTS.PLAYFIELD_WIDTH143 jp nz, .nextLine_10145 147 149 ld (OS.tempWord), hl151 152 push iy153 pop hl154 ld bc, TETRA_VARS.PLAYFIELD155 add hl, bc156 ld (OS.tempWord_1), hl158 159 push iy160 pop hl161 ld bc, TETRA_VARS.PLAYFIELD_BUFFER162 add hl, bc163 ld (OS.tempWord_2), hl165 166 ld hl, (OS.tempWord_1) 167 ld de, (OS.tempWord_2) 168 ld bc, TETRA_CONSTANTS.PLAYFIELD_WIDTH * TETRA_CONSTANTS.PLAYFIELD_HEIGHT169 ldir171 174 175 ld hl, (OS.tempWord_2) 176 ld de, TETRA_CONSTANTS.PLAYFIELD_WIDTH177 add hl, de178 ex de, hl180 182 ld hl, (OS.tempWord_1) 183 ld bc, TETRA_CONSTANTS.PLAYFIELD_WIDTH184 add hl, bc186 push hl 187 pop bc189 ld hl, (OS.tempWord)191 xor a192 sbc hl, bc194 push hl 195 pop bc199 ld hl, (OS.tempWord_1) 201 ldir 203 205 206 ld hl, (OS.tempWord_2) 208 xor a209 ld b, TETRA_CONSTANTS.PLAYFIELD_WIDTH210.loop_20:211 ld (hl), a212 inc hl213 djnz .loop_20215 ld hl, (OS.tempWord) 217 218 ld hl, (OS.tempWord_2) 219 ld de, (OS.tempWord_1) 220 ld bc, TETRA_CONSTANTS.PLAYFIELD_WIDTH * TETRA_CONSTANTS.PLAYFIELD_HEIGHT221 ldir223 jp .nextLine_10226228.keyPressed_Right:229 230 ld a, (iy + TETRA_VARS.OLD_KEYBOARD_LINE_8)231 bit 7, a 232 jp z, .continue234 235 call .piece_Right237 jp .continue239.keyPressed_Left:240 241 ld a, (iy + TETRA_VARS.OLD_KEYBOARD_LINE_8)242 bit 4, a 243 jp z, .continue245 246 call .piece_Left248 jp .continue250.keyPressed_Up:251 252 ld a, (iy + TETRA_VARS.OLD_KEYBOARD_LINE_8)253 bit 5, a 254 jp z, .continue256 258 260 261 push iy262 pop hl263 ld de, TETRA_VARS.CURRENT_PIECE264 add hl, de266 push hl267 268 push iy269 pop hl270 ld de, TETRA_VARS.CURRENT_PIECE_TEMP271 add hl, de272 ex de, hl273 pop hl276 277 ld a, (iy + TETRA_VARS.CURRENT_PIECE_TYPE)278 cp TETRA_CONSTANTS.PIECE_TYPE_SQUARE279 jp z, .continue281 push hl, de282 call .RotatePiece_Right284 285 ld d, (iy + TETRA_VARS.PIECE_X)286 ld e, (iy + TETRA_VARS.PIECE_Y)287 ld bc, TETRA_VARS.CURRENT_PIECE_TEMP288 call .isPiecePositionValid290 pop hl, de 291 jp z, .continue293 294 ld bc, 4 * 4295 ldir297 jp .continue299301.piece_Left:303 ld d, (iy + TETRA_VARS.PIECE_X)304 dec d305 ld e, (iy + TETRA_VARS.PIECE_Y)306 ld bc, TETRA_VARS.CURRENT_PIECE307 call .isPiecePositionValid308 ret z310 dec (iy + TETRA_VARS.PIECE_X)312 ret314.piece_Right:316 ld d, (iy + TETRA_VARS.PIECE_X)317 inc d318 ld e, (iy + TETRA_VARS.PIECE_Y)319 ld bc, TETRA_VARS.CURRENT_PIECE320 call .isPiecePositionValid321 ret z323 inc (iy + TETRA_VARS.PIECE_X)325 ret327329337.isPiecePositionValid:339 340 push ix341 pop hl342 ld (OS.tempWord), hl344 345 push bc, de346 call Tetra_Draw.ConvertPiece_DE_ToLinear348 ld bc, TETRA_VARS.PLAYFIELD349 add hl, bc350 351 push hl 352 pop ix353 354 push iy 355 pop bc357 add ix, bc358 pop de, bc360 362 push iy 363 pop hl364 add hl, bc366 ld b, 0 367.isPiecePositionValid_outerLoop:368 ld c, 0 369 .isPiecePositionValid_innerLoop:370 371 ld a, (hl)372 or a373 jp z, .isPiecePositionValid_next375 376 377 378 ld a, d379 add c381 382 cp 9 + 1383 jp nc, .return_Invalid385 386 cp 0387 jp c, .return_Invalid389 391 ld a, b392 add e393 cp TETRA_CONSTANTS.PLAYFIELD_HEIGHT394 jp nc, .return_Invalid396 397 ld a, (ix)398 or a399 jp nz, .return_Invalid401 .isPiecePositionValid_next:402 403 inc ix405 inc hl 407 inc c408 ld a, c409 cp 4410 jp z, .isPiecePositionValid_nextLine412 jp .isPiecePositionValid_innerLoop415.isPiecePositionValid_nextLine:416 417 push bc418 ld bc, TETRA_CONSTANTS.PLAYFIELD_WIDTH - 4419 add ix, bc420 pop bc422 inc b423 ld a, b424 cp 4425 jp nz, .isPiecePositionValid_outerLoop427 430 431 ld ix, (OS.tempWord)433 434 xor a435 inc a436 ret438.return_Invalid:439 440 ld ix, (OS.tempWord)442 xor a443 ret445447450.RotatePiece_Right:452 453 ld a, (iy + TETRA_VARS.CURRENT_PIECE_TYPE)454 cp TETRA_CONSTANTS.PIECE_TYPE_I455 jp nz, .rotatePiece_3x3_Right457 458 push ix, iy460 462 push hl 463 pop ix464 push de 465 pop iy467 468 ld bc, 3 469 add iy, bc470 call .RotatePiece_LineToCol472 inc c 474 475 add ix, bc 476 dec iy 477 call .RotatePiece_LineToCol479 480 add ix, bc 481 dec iy 482 call .RotatePiece_LineToCol484 485 add ix, bc 486 dec iy 487 call .RotatePiece_LineToCol489 pop iy, ix491 ret493.rotatePiece_3x3_Right:494 495 push ix, iy497 499 push hl 500 pop ix501 push de 502 pop iy504 505 ld bc, 2 506 add iy, bc507 call .RotatePiece_3x3_LineToCol509 inc c 510 inc c512 513 add ix, bc 514 dec iy 515 call .RotatePiece_3x3_LineToCol517 518 add ix, bc 519 dec iy 520 call .RotatePiece_3x3_LineToCol522 524 526 xor a527 add (iy + 0)528 add (iy + 4)529 add (iy + 8)530 jp nz, .skip_ShiftPieceLeft532 534 ld a, (iy + 1) 535 ld (iy + 0), a536 ld a, (iy + 2) 537 ld (iy + 1), a538 xor a 539 ld (iy + 2), a541 542 ld a, (iy + 5)543 ld (iy + 4), a544 ld a, (iy + 6)545 ld (iy + 5), a546 xor a547 ld (iy + 6), a549 550 ld a, (iy + 9)551 ld (iy + 8), a552 ld a, (iy + 10)553 ld (iy + 9), a554 xor a555 ld (iy + 10), a557 .skip_ShiftPieceLeft:559 560 xor a561 ld (iy + 3), a562 ld (iy + 7), a563 ld (iy + 11), a564 ld (iy + 15), a565 ld (iy + 12), a566 ld (iy + 13), a567 ld (iy + 14), a570 pop iy, ix571 573 ret576.RotatePiece_LineToCol:577 ld a, (ix + 0)578 ld (iy + 0), a580 ld a, (ix + 1)581 ld (iy + 4), a583 ld a, (ix + 2)584 ld (iy + 8), a586 ld a, (ix + 3)587 ld (iy + 12), a589 ret591.RotatePiece_3x3_LineToCol:592 ld a, (ix + 0)593 ld (iy + 0), a595 ld a, (ix + 1)596 ld (iy + 4), a598 ld a, (ix + 2)599 ld (iy + 8), a601 retApps/Tetra/Header.s73Tetra_Draw:74 Apps/Tetra/Draw.s17 13 15 16 ld de, TETRA_VARS.PLAYFIELD_BUFFER17 push iy 18 pop hl19 add hl, de20 push hl22 23 ld de, TETRA_VARS.PLAYFIELD24 push iy 25 pop hl26 add hl, de27 pop de28 29 ld bc, TETRA_CONSTANTS.PLAYFIELD_WIDTH * TETRA_CONSTANTS.PLAYFIELD_HEIGHT30 ldir34 35 36 call .ConvertPiece_XY_ToLinear38 39 push hl40 ld de, TETRA_VARS.PLAYFIELD_BUFFER41 push iy 42 pop hl43 add hl, de44 pop de45 add hl, de46 48 call .PutPieceIntoPlayfield52 53 ld de, TETRA_VARS.PLAYFIELD_BUFFER54 push iy 55 pop hl56 add hl, de57 ex de, hl59 push de60 call GET_USEFUL_WINDOW_BASE_NAMTBL61 ld de, 3262 add hl, de63 pop de66 ld c, TETRA_CONSTANTS.PLAYFIELD_HEIGHT 67.outerLoop_1:68 call BIOS_SETWRT70 push hl71 ld b, TETRA_CONSTANTS.PLAYFIELD_WIDTH 72 .loop_1:73 ld a, (de)74 or a75 jr nz, .drawPlayfield_cont77 ld a, TILE_EMPTY_BLACK78 .drawPlayfield_cont:79 out (PORT_0), a80 inc de81 djnz .loop_182 pop hl84 85 push de86 ld de, 3287 add hl, de88 pop de90 dec c91 jp nz, .outerLoop_195 ret9799.PutPieceIntoPlayfield:100 101 ld a, (iy + TETRA_VARS.CURRENT_PIECE)102 call .drawPieceTile104 ld a, (iy + TETRA_VARS.CURRENT_PIECE + 1)105 call .drawPieceTile107 ld a, (iy + TETRA_VARS.CURRENT_PIECE + 2)108 call .drawPieceTile110 ld a, (iy + TETRA_VARS.CURRENT_PIECE + 3)111 call .drawPieceTile112 114 ld de, TETRA_CONSTANTS.PLAYFIELD_WIDTH - 4 115 add hl, de117 118 ld a, (iy + TETRA_VARS.CURRENT_PIECE + 4)119 call .drawPieceTile121 ld a, (iy + TETRA_VARS.CURRENT_PIECE + 5)122 call .drawPieceTile124 ld a, (iy + TETRA_VARS.CURRENT_PIECE + 6)125 call .drawPieceTile127 ld a, (iy + TETRA_VARS.CURRENT_PIECE + 7)128 call .drawPieceTile129 131 ld de, TETRA_CONSTANTS.PLAYFIELD_WIDTH - 4 132 add hl, de134 135 ld a, (iy + TETRA_VARS.CURRENT_PIECE + 8)136 call .drawPieceTile138 ld a, (iy + TETRA_VARS.CURRENT_PIECE + 9)139 call .drawPieceTile141 ld a, (iy + TETRA_VARS.CURRENT_PIECE + 10)142 call .drawPieceTile144 ld a, (iy + TETRA_VARS.CURRENT_PIECE + 11)145 call .drawPieceTile146 148 ld de, TETRA_CONSTANTS.PLAYFIELD_WIDTH - 4 149 add hl, de151 153 ld a, (iy + TETRA_VARS.CURRENT_PIECE + 12)154 call .drawPieceTile156 ld a, (iy + TETRA_VARS.CURRENT_PIECE + 13)157 call .drawPieceTile159 ld a, (iy + TETRA_VARS.CURRENT_PIECE + 14)160 call .drawPieceTile162 ld a, (iy + TETRA_VARS.CURRENT_PIECE + 15)163 call .drawPieceTile164 165 166 ret168.drawPieceTile:169 or a170 jr z, .drawPieceTile_ignore172.drawPieceTile_cont:173 ld (hl), a174.drawPieceTile_ignore:175 inc hl176 ret178180185.ConvertPiece_XY_ToLinear:187 189 ld hl, 0190 ld de, TETRA_CONSTANTS.PLAYFIELD_WIDTH191 ld a, (iy + TETRA_VARS.PIECE_Y)192 or a193 jp z, .ConvertPiece_XY_ToLinear_skip_Mult194 ld b, a195.ConvertPiece_XY_ToLinear_loop_Mult:196 add hl, de197 djnz .ConvertPiece_XY_ToLinear_loop_Mult 198.ConvertPiece_XY_ToLinear_skip_Mult:200 201 ld d, 0202 ld e, (iy + TETRA_VARS.PIECE_X)203 add hl, de205 ret209215.ConvertPiece_DE_ToLinear:217 ld a, d218 ld (OS.tempVar_1), a 219 220 ld a, e221 ld (OS.tempVar_2), a 223 225 ld hl, 0226 ld de, TETRA_CONSTANTS.PLAYFIELD_WIDTH227 ld a, (OS.tempVar_2)228 or a229 jp z, .ConvertPiece_DE_ToLinear_skip_Mult230 ld b, a231.ConvertPiece_DE_ToLinear_loop_Mult:232 add hl, de233 djnz .ConvertPiece_DE_ToLinear_loop_Mult234.ConvertPiece_DE_ToLinear_skip_Mult:236 237 ld d, 0238 ld a, (OS.tempVar_1)239 ld e, a240 add hl, de242 retApps/Tetra/Header.s76Tetra_Click:77 Apps/Tetra/Click.s17 ret8Apps/Tetra/Header.s79Tetra_GetFocus:80 Apps/Tetra/GetFocus.s15 6 7 retApps/Tetra/Header.s82Tetra_LoseFocus:83 Apps/Tetra/LoseFocus.s15 6 7 retApps/Tetra/Header.s85Tetra_Close:86 Apps/Tetra/Close.s15 7 retApps/Tetra/Header.s88Tetra.EndProgramCode: 9293Tetra.StartProgramData:95Tetra_Icon:96 Apps/Tetra/Icon.s13 DB 11111111 b4 DB 10001111 b5 DB 10001111 b6 DB 10001111 b7 DB 11111111 b8 DB 10001000 b9 DB 10001000 b10 DB 10001000 b12 DB 11111111 b13 DB 10001111 b14 DB 10001111 b15 DB 10001111 b16 DB 11111111 b17 DB 11111111 b18 DB 11111111 b19 DB 11111111 b21 DB 11111111 b22 DB 11111000 b23 DB 11111000 b24 DB 11111000 b25 DB 11111111 b26 DB 11111000 b27 DB 11111000 b28 DB 11111000 b3134 DB 11111111 b35 DB 11111111 b36 DB 11111111 b37 DB 11111111 b38 DB 11111111 b39 DB 11111111 b40 DB 11111111 b41 DB 11111111 b43 DB 11111111 b44 DB 11111111 b45 DB 11111111 b46 DB 11111111 b47 DB 11111111 b48 DB 11111111 b49 DB 11111111 b50 DB 11111111 b52 DB 11111111 b53 DB 10001111 b54 DB 10001111 b55 DB 10001111 b56 DB 11111111 b57 DB 10001111 b58 DB 10001111 b59 DB 10001111 b6163 DB 11111111 b64 DB 11111111 b65 DB 11111111 b66 DB 11111111 b67 DB 11111111 b68 DB 11111111 b69 DB 11111111 b70 DB 11111111 b72 DB 11111111 b73 DB 10001111 b74 DB 10001111 b75 DB 10001111 b76 DB 11111111 b77 DB 10001000 b78 DB 10001000 b79 DB 10001000 b82 DB 11111111 b83 DB 11111000 b84 DB 11111000 b85 DB 11111000 b86 DB 11111111 b87 DB 11111111 b88 DB 11111111 b89 DB 11111111 b9192Apps/Tetra/Header.s98Tetra_Data:99 Apps/Tetra/Data.s12425.TILE_pattern:26 db 00000000 b27 db 01111111 b28 db 01111111 b29 db 01111111 b30 db 01111111 b31 db 01111111 b32 db 01111111 b33 db 01111111 b35.TILE_LIGHT_BLUE_colors:36 db 0x7f37 db 0x7f38 db 0x7f39 db 0x7f40 db 0x7f41 db 0x7f42 db 0x7f43 db 0x7f45.TILE_RED_colors:46 db 0x8f47 db 0x8f48 db 0x8f49 db 0x8f50 db 0x8f51 db 0x8f52 db 0x8f53 db 0x8f55.TILE_YELLOW_colors:56 db 0xaf57 db 0xaf58 db 0xaf59 db 0xaf60 db 0xaf61 db 0xaf62 db 0xaf63 db 0xaf65.TILE_PURPLE_colors:66 db 0xdf67 db 0xdf68 db 0xdf69 db 0xdf70 db 0xdf71 db 0xdf72 db 0xdf73 db 0xdf75.TILE_GRAY_colors:76 db 0xef77 db 0xef78 db 0xef79 db 0xef80 db 0xef81 db 0xef82 db 0xef83 db 0xef85.TILE_GREEN_colors:86 db 0xcf87 db 0xcf88 db 0xcf89 db 0xcf90 db 0xcf91 db 0xcf92 db 0xcf93 db 0xcf95.TILE_BLUE_colors:96 db 0x4f97 db 0x4f98 db 0x4f99 db 0x4f100 db 0x4f101 db 0x4f102 db 0x4f103 db 0x4f105107.PIECE_SQUARE: 108 db 1, 1, 0, 0109 db 1, 1, 0, 0110 db 0, 0, 0, 0111 db 0, 0, 0, 0113.PIECE_I: 114 db 1, 0, 0, 0115 db 1, 0, 0, 0116 db 1, 0, 0, 0117 db 1, 0, 0, 0119.PIECE_L: 120 db 1, 0, 0, 0121 db 1, 0, 0, 0122 db 1, 1, 0, 0123 db 0, 0, 0, 0125.PIECE_J: 126 db 0, 1, 0, 0127 db 0, 1, 0, 0128 db 1, 1, 0, 0129 db 0, 0, 0, 0131.PIECE_T: 132 db 0, 1, 0, 0133 db 1, 1, 1, 0134 db 0, 0, 0, 0135 db 0, 0, 0, 0137.PIECE_Z: 138 db 0, 1, 0, 0139 db 1, 1, 0, 0140 db 1, 0, 0, 0141 db 0, 0, 0, 0143.PIECE_S: 144 db 1, 0, 0, 0145 db 1, 1, 0, 0146 db 0, 1, 0, 0147 db 0, 0, 0, 0150152TETRA_VARS:153 .CURRENT_PIECE: equ 0 154 .PIECE_X: equ 16 155 .PIECE_Y: equ 17 156 .OLD_KEYBOARD_LINE_8: equ 18 157 .COUNTER: equ 19 158 .CURRENT_PIECE_TYPE: equ 20 159 160 162 .PLAYFIELD: equ 40 163 164 .PLAYFIELD_BUFFER: equ 240 165 166 .CURRENT_PIECE_TEMP: equ 440 168170TETRA_CONSTANTS:171 .PLAYFIELD_WIDTH: equ 10172 .PLAYFIELD_HEIGHT: equ 18174 .PIECE_TYPE_SQUARE: equ 0175 .PIECE_TYPE_I: equ 1176 .PIECE_TYPE_L: equ 2177 .PIECE_TYPE_J: equ 3178 .PIECE_TYPE_T: equ 4179 .PIECE_TYPE_Z: equ 5180 .PIECE_TYPE_S: equ 6181Apps/Tetra/Header.s101Tetra.EndProgramData: 103System\Main.s45Apps_Size: equ $ - Apps_Start 49Execute:50 51 di 52 im 1 53 ld sp, (BIOS_HIMEM) 54 ei56 59 call _INIT61.OS_MainLoop:64 65 call _DRAW_MOUSE_CURSOR66 call _MOUSE_CLICK67 call _MOUSE_OVER69 70 call _READ_KEYBOARD73 74 ld a, (OS.timeCounter)75 or a76 jp nz, .skip77 78 call _DRAW_TASKBAR_CLOCK80 .skip:81 83 84 ld ix, (OS.currentProcessAddr)85 ld a, ixl86 or ixh87 jp z, .noCurrentProcess 89 90 ld l, (ix + PROCESS_STRUCT_IX.ramStartAddr)91 ld h, (ix + PROCESS_STRUCT_IX.ramStartAddr + 1)93 push hl 94 pop iy96 ld e, (ix + PROCESS_STRUCT_IX.workAddr) 97 ld d, (ix + PROCESS_STRUCT_IX.workAddr + 1) 98 call JP_DE99 .noCurrentProcess:101 jp .OS_MainLoop104 105 db "End ROM started at 0x4000"107ROM_Size: equ $ - ROM_Start109 ds PageSize - ($ - 0x4000), 255 113114 org 0xc000, 0xe5ff116 System/Ram.s13710121519RamStart:2123Seed: rw 125OS:2728.mouseSpriteAttributes:29.mouseY: rb 130.mouseX: rb 131.mousePattern: rb 132.mouseColor: rb 133.mouseY_1: rb 134.mouseX_1: rb 135.mousePattern_1: rb 136.mouseColor_1: rb 137.windowCorner_TopLeft_Y: rb 138.windowCorner_TopLeft_X: rb 139.windowCorner_TopLeft_Pattern: rb 140.windowCorner_TopLeft_Color: rb 141.windowCorner_TopRight_Y: rb 142.windowCorner_TopRight_X: rb 143.windowCorner_TopRight_Pattern: rb 144.windowCorner_TopRight_Color: rb 145.windowCorner_BottomLeft_Y: rb 146.windowCorner_BottomLeft_X: rb 147.windowCorner_BottomLeft_Pattern: rb 148.windowCorner_BottomLeft_Color: rb 149.windowCorner_BottomRight_Y: rb 150.windowCorner_BottomRight_X: rb 151.windowCorner_BottomRight_Pattern: rb 152.windowCorner_BottomRight_Color: rb 154.mouseButton_1: rb 155.mouseButton_2: rb 157.oldMouseButton_1: rb 158.oldMouseButton_2: rb 160.mouseLastClick_Jiffy: rw 161.isDoubleClick: rb 164.isDraggingWindow: rb 165.dragOffset_X: rb 1 66.dragOffset_Y: rb 167.isResizingWindow: rb 168.resizeWindowCorner_BottomRight_X_Min: rb 169.resizeWindowCorner_BottomRight_Y_Min: rb 171.oldKeyboardMatrix: rb 11 73.ticksSinceLastInput: rw 1 7677.currentTime: 78.currentTime_Hours: rb 179.currentTime_Minutes: rb 180.currentTime_Seconds: rb 182.currentDate: 83.currentDate_Day: rb 184.currentDate_Month: rb 185.currentDate_Year: rb 287.timeCounter: rb 1 9192.storeOldInterruptHook: rb 693.interruptBusy: rb 19698100106.screenMapping: rb 32*24107.currentTileMouseOver: rb 1 109.nextWindow_x: rb 1110.nextWindow_y: rb 1112.mouseOver_Activated: rb 1113.mouseOver_screenMappingValue: rb 1114.mouseOver_tileToBeRestored: rb 1115.mouseOver_NAMTBL_addr: rw 1117.taskbar_Button_0_Process_addr: rw 1118.taskbar_Button_1_Process_addr: rw 1119.taskbar_Button_2_Process_addr: rw 1120.taskbar_Button_3_Process_addr: rw 1122.desktop_Tiles: rb 32 * 22124125.tempVar_1: rb 1126.tempVar_2: rb 1127.tempWord: rw 1128.tempWord_1: rw 1129.tempWord_2: rw 1130.tempWord_3: rw 1132.tempIcon: rb NUMBER_OF_TILES_PER_ICON * 8134135.currentProcessAddr: rw 1 136.nextAvailableProcessAddr: rw 1138140.processes: 141 rb Process_struct.size * (MAX_PROCESS_ID + 1) 142 .process_slot_0: equ .processes + (Process_struct.size * 0)143 .process_slot_1: equ .processes + (Process_struct.size * 1)144 .process_slot_2: equ .processes + (Process_struct.size * 2)145 .process_slot_3: equ .processes + (Process_struct.size * 3)146.processes_end:147.processes_size: equ $ - .processes150153.PROCESS_VARS_AREA_SIZE: equ 1024155.processesVariablesArea: 156 rb .PROCESS_VARS_AREA_SIZE * (MAX_PROCESS_ID + 1) 157 .processesVariablesArea_0: equ .processesVariablesArea + (.PROCESS_VARS_AREA_SIZE * 0)158 .processesVariablesArea_1: equ .processesVariablesArea + (.PROCESS_VARS_AREA_SIZE * 1)159 .processesVariablesArea_2: equ .processesVariablesArea + (.PROCESS_VARS_AREA_SIZE * 2)160 .processesVariablesArea_3: equ .processesVariablesArea + (.PROCESS_VARS_AREA_SIZE * 3)161.processesVariablesArea_end:162.processesVariablesArea_size: equ $ - .processesVariablesArea164166167Process_struct:168.processId: rb 1 169.windowState: rb 1 170.x: rb 1171.y: rb 1172.width: rb 1173.height: rb 1174.minWidth: rb 1175.minHeight: rb 1177.windowTitle: rb 16178.taskbarTitle: rb 4179.iconTitle: rb 7180.isFixedSize: rb 1 181.vertScrollbarEnabled: rb 1 182.vertScrollbarPosition: rb 1183187192193.openAddr: rw 1194.workAddr: rw 1195.drawAddr: rw 1196.clickAddr: rw 1197.getFocusAddr: rw 1198.loseFocusAddr: rw 1199.closeAddr: rw 1201.iconAddr: rw 1 203.ramSize: rw 1 212.size_Header: equ $ - Process_struct214215.ramStartAddr: rw 1216.vramStartTile: rb 1218.layer: rb 1 221.previousWindowState: rb 1 223.size: equ $ - Process_struct226229PROCESS_STRUCT_IX:230.processId: equ Process_struct.processId - Process_struct231.windowState: equ Process_struct.windowState - Process_struct232.x: equ Process_struct.x - Process_struct233.y: equ Process_struct.y - Process_struct234.width: equ Process_struct.width - Process_struct235.height: equ Process_struct.height - Process_struct236.minWidth: equ Process_struct.minWidth - Process_struct237.minHeight: equ Process_struct.minHeight - Process_struct239.windowTitle: equ Process_struct.windowTitle - Process_struct240.taskbarTitle: equ Process_struct.taskbarTitle - Process_struct241.iconTitle: equ Process_struct.iconTitle - Process_struct242.isFixedSize: equ Process_struct.isFixedSize - Process_struct243.vertScrollbarEnabled: equ Process_struct.vertScrollbarEnabled - Process_struct244.vertScrollbarPosition: equ Process_struct.vertScrollbarPosition - Process_struct246.openAddr: equ Process_struct.openAddr - Process_struct247.workAddr: equ Process_struct.workAddr - Process_struct248.drawAddr: equ Process_struct.drawAddr - Process_struct249.clickAddr: equ Process_struct.clickAddr - Process_struct250.getFocusAddr: equ Process_struct.getFocusAddr - Process_struct251.loseFocusAddr: equ Process_struct.loseFocusAddr - Process_struct252.closeAddr: equ Process_struct.closeAddr - Process_struct254.iconAddr: equ Process_struct.iconAddr - Process_struct256257.ramStartAddr: equ Process_struct.ramStartAddr - Process_struct258.vramStartTile: equ Process_struct.vramStartTile - Process_struct260.layer: equ Process_struct.layer - Process_struct262.previousWindowState: equ Process_struct.previousWindowState - Process_struct264270RamEnd:System\Main.s117