romchk: procedure returns(bin fixed(7)); /* routine to check for presence of the Turbo ROM and return a code 0 = no ROM 1 = 83 machine 2 = 84 machine */ declare 1 rom_id based(absptr), 2 sig char(3), 2 version bit(8), 2 jump(3) bit(8), 2 chcksum bin fixed(7), 1 rom_id0 based(absptr), 2 signature(1:8) bin fixed(7), checksum bin fixed(7), i bin fixed(7), absptr pointer; /*assign pointer*/ unspec(absptr)='FFF8'b4; /*match signature*/ if sig ^= 'PPS' then return(0); /*compute checksum*/ checksum=0; do i=1 to 8; checksum=checksum+signature(i); end; if checksum ^= 0 then return(0); /*get machine type*/ if substr(version,1,1) then return(2); else return(1); end romchk;