; Dissassembly of AMSDOS.COM taken from CPC6128 CP/M system discs ; AMSDOS.COM on side 1,2,3 or 4 is identical 0100 0e0c ld c,0ch 0102 cd0500 call 0005h ;; CP/M version 0105 7d ld a,l 0106 f3 di ;; disable interrupts 0107 018e7f ld bc,7f8eh ;; ensure BC' will be setup for firmware 010a d9 exx 010b 08 ex af,af' ;; ensure AF is setup for firmware 010c af xor a 010d 08 ex af,af' 010e 110000 ld de,0000h ;; check version of CPM 0111 fe30 cp 30h 0113 380f jr c,0124h ;; CPM+ version 0115 110040 ld de,4000h 0118 01c47f ld bc,7fc4h ;; I/O address for memory paging. &c4 puts extra memory page 0 into &4000-&7fff range 011b 21ed49 ld hl,49edh ;; 49ed when written to memory becomes OUT (C),C instruction 011e 222241 ld (4122h),hl ;; store instruction 0121 c32241 jp 4122h ;; execute instruction, calling OUT. this will put extra memory page 0 into &4000-&7fff range and execute from 4122. ;; CPM2.2 version 0124 3100c0 ld sp,0c000h ;; reset stack 0127 3ec9 ld a,0c9h ;; RET instruction 0129 323800 ld (0038h),a ;; null out interrupt with RET 012c d5 push de 012d cdc8bc call 0bcc8h ;; firmware function: KL CHOKE OFF 0130 d1 pop de 0131 213901 ld hl,0139h ;; "BASIC" (e.g. |BASIC) 0134 19 add hl,de 0135 cdd4bc call 0bcd4h ;; firmware function: KL FIND COMMAND 0138 c7 rst 00h ;; reset 0139h: defb "BASI","C"+&80 defb &1a ;; CPM EOF marker