.z80 aseg org 0100h ; Check ID info for correctness (checksum) dskchk: ld hl,MsDos_Mtab_Dpb + 26 ;pointer to end of table+1 ld b,25 ;count must be odd! for field of E5 xor a ;init check byte ld e,a ;init 0-check byte chklp: dec hl ;dec pointer xor (hl) ;x-or table value into parity check byte ld d,a ;save parity check byte or e ;or in 0-check byte ld e,a ;save 0-check byte ld a,d ;restore pariy check byte djnz chklp ;dec table length & loop til done rst 38h ;---------------------------------------------------------------------- ; Data Area (22_Oct_84) ;---------------------- ; ds 200h - $,0 ;Mtab Definition MsDos_Mtab_Dpb: db 0,4,0,0,0 ;Double Density Mtab db 0,0,0,0 ;Dpb Definition dw 36 ;secsty Mtab/Dpb,CheckSum Sngl_Mtab_Dpb: db 0,0,0,0,0 ;Single Density Mtab db 0,0,0,0 db 40,0,4,15,1,94 ;Single Density Dpb db 0,127,0,192,0 db 32,0,2,0 db 0E1h ;CheckSum end