CP/M serial number for Davidge DSB-4/6 in FD-4000 BIOS v1.3: As found in the CCP: 0CA0 52 45 4E 20 55 53 45 52 2C 16 03 00 28 6A 21 10 REN USER,...(j!. ; | | | | | | ; 2C = LSB Mfr Code __/ | | | | | ; 03 = MSB Mfr Code -----|--+ | | | ; 16h=22d, 2.2 CP/M version ____/ / / / ; 00 = MSB serial # _________/ / / ; 28 = serial # ___________/ / ; 6A = LSB serial # _____________/ As found in BDOS: -d1180 1180 2C 16 03 00 28 6A C3 11 E2 99 E2 A5 E2 AB E2 B1 ,...(j.......... | | | | | | | | | | | \_ LSB serial # = 6A | | | | \____ serial # = 28 | | | \_______ MSB serial # = 00 | +--|---------- CP/M version, 16h=22d, 2.2 \ \__________ MSB Mfr Code = 03 \________________LSB Mfr Code = 2C Mfr code, 032Ch = 812d CP/M S/N, 00286Ah = 10346d BIOS sign-on message: 64k CP/M Vers 2.2 (FD4000 V1.3) Serial # 812-10346 As found in my disassembly of the FD4000 v1.3 BIOS: ; ; compute CP/M Serial # ; LDA BDOS ;get LSB MFR code MOV E,A ;in E LDA BDOS+2 ;get MSB of MFR code MOV D,A ;in D LXI H,MFRCD ;HL -> MFR code field CALL H2D2A ;hex->dec->ASCII conversion LHLD BDOS+4 ;get BDOS serial # (LSW) MOV D,L ;byte-swap into DE MOV E,H LXI H,SNSTR ;HL -> Ser. # field CALL H2D2A ;hex->dec-ASCII conversion ; SIGNON: LXI H,SIGNMSG ;HL points to signon msg CALL nlmsg ;print CRLF then message LXI H,ccp ;go here after cold boot cbootgo equ $-2 ;patch the previous word to chain JMP gocpm ; to GIDE BIOS ; H2D2A: PUSH H ;save output string addr. ; ; zero-out field in output string XRA A MVI B,6 zrsnfld: MOV M,A INX H DJNZ zrsnfld ;LF899 ; POPIX ;output field ptr in IX LXIY dvsrtbl ;LF8DE ;divisor table base in IY XCHG ;dividend in HL LXI D,0 ;0000 in DE ; sndvlp: ;LF8A7: MOV A,D ;get D into A (1st 0, then '0') DCR A ;decrement now FF/2F (init quotient) LDY C,0 ;byte from table into C INR C ;if end of table, FF->00 JRZ sndvdn ;LF8D6 ;brif end of table DCR C ;wasn't 0 (FF, end of table), restore LDY B,1 ;get 1(IY) into B (BC=divisor) INXIY INXIY ;point to next divisor sndvlp1: ;LF8B7: ORA A ;test A (clear Carry) INR A ;++quotient DSBC BC ;HL = HL-BC... JRNC sndvlp1 ;LF8B7 ; while HL >= BC INR E ;test E (why is this even here?) DCR E ; (possible start for 24-bit divide?) JRNZ LF8D3 ;brif E non-zero DAD B ;E==0, HL = HL + BC (restore remainder) ORA A ;set/clear flags JRZ sndvlp ;LF8A7 ;brif quotient (A) == 0 (HL < BC) ; get next divisor CPI 10 ;non-0 quotient, >= 10? JRNC wrsnfld ;LF8CC ;brif already ASCII (store byte and go again) MVI D,'0' ;A <= 10, make ASCII digit ORA D wrsnfld: ;LF8CC: STX A,0 ;store in field @ 0(IX) INXIX ;++IX to next char in field JR sndvlp ;LF8A7 ;continue w/next divisor LF8D3: DCR E ;--E JR sndvlp1 ;LF8B7 ;keep subtracting (dividing) sndvdn: ;LF8D6: INR A ;A has last quotient, was it zero? RNZ ;return if 0->1 MVI A,'0' ;else FF->0, get ASCII zero char STX A,0 ;store in field @ 0(IX) RET ; dvsrtbl: ;divisors for hex->dec(->ASCII) conversion DW 10000, 1000, 100, 10, 1 DW 0FFFFH ;end of table ; ; port initialization tables ... ; ; SIGNMSG: DB '64k CP/M Vers 2.2 (FD4000 V1.3)' DB cr,lf,' Serial # ' MFRCD: DB 0,0,0,0,0,0 ;up to 6 digit Mfr code DB '-' ;dash SNSTR: DB 0,0,0,0,0,0 ;up to 6 digit Ser. # DB cr,lf+80h ;,+80h to mark end.