; Dissassembly of DRLKEYS.COM from side 4 of the CPC6128 system discs ; this program is for cpc only and for cpm 2.2 ; ; This program is used by Dr.Logo 0100 0e0c ld c,&0c ;; get cpm version 0102 cd0500 call &0005 ;; BDOS 0105 7d ld a,l 0106 fe22 cp &22 ;; 2.2? 0108 ca1801 jp z,&0118 010b 117901 ld de,&0179 010e 0e09 ld c,&09 ;; print message 0110 cd0500 call &0005 ;; BDOS 0113 0e00 ld c,&00 ;; system reset 0115 cd0500 call &0005 ;; BDOS ;; if cpm 2.2 ;; initialise firmware 0118 cd9bbe call &be9b defw &bbff ;; SCR INITIALISE 011d cd9bbe call &be9b defw &bb00 ;; KM INITIALISE 0122 cd9bbe call &be9b defw &bb4e ;; TXT INITIALISE 0127 cd9bbe call &be9b defw &bbba ;; GRA INITIALISE ;; set key translations 012c 215801 ld hl,&0158 012f 7e ld a,(hl) 0130 feff cp &ff ;; look for end of list terminator 0132 c8 ret z ;; will quit here 0133 23 inc hl 0134 46 ld b,(hl) 0135 e5 push hl 0136 f5 push af 0137 cd9bbe call &be9b defw &bb27 ;; KM SET TRANSLATE 013c f1 pop af 013d e1 pop hl 013e 23 inc hl 013f 46 ld b,(hl) 0140 e5 push hl 0141 f5 push af 0142 cd9bbe call &be9b defw &bb2d ;; KM SET SHIFT 0147 f1 pop af 0148 e1 pop hl 0149 23 inc hl 014a 46 ld b,(hl) 014b e5 push hl 014c f5 push af 014d cd9bbe call &be9b defb &bb33 ;; KM SET CONTROL 0152 f1 pop af 0153 e1 pop hl 0154 23 inc hl 0155 c32f01 jp &012f ;; key number, normal, shift, control 0158 defb &1 defb &06,&06,&05 defb &08 defb &02,&02,&01 defb &10 defb &04,&04,&04 defb &42 defb &07,&07,&07 defb &4f defb &08,&08,&08 defb &09 defb &03,&03,&03 defb &00 defb &10,&10,&15 defb &02 defb &0e,&0e,&16 defb &ff 0179 defb "ERROR: Requires CP/M 2.2",13,10,"$"