Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!elroy!mahendo!wlbr!pete From: pete@wlbr.EATON.COM (Pete Lyall) Newsgroups: comp.os.os9 Subject: Re: CRC-24 Routine for Executables ?? Message-ID: <22294@wlbr.EATON.COM> Date: 28 Jul 88 22:56:57 GMT References: <514@hpwala.HP.COM> Reply-To: pete@wlbr.UUCP (0000-Pete Lyall) Organization: Eaton IMS, Westlake Village, CA Lines: 30 In article <514@hpwala.HP.COM> johns@hpwala.UUCP (John Silva) writes: > Does anyone know of a CRC-24 routine for calculating the CRC that is used >when OS-9 loads a program (the one in the descriptor - if I have the >terminology right ...) ?? John - There's a built in system call to handle the generation of 24 bit CRC's (at least in 6809/OS9....I''m sure there's something similar in os9/68000 as well). Have your friend look at the 'F$CRC' call. In essence he needs to initialize a three byte area (the temporary CRC accumulator) to $FF's. Then set: X register = starting address of block to generate CRC for Y register = number of bytes to process D register = pointer to the 3 byte area used as a CRC accumulator. then just 'OS9 F$Crc' The file/data to be CRC'd may be processed in several chunks.. the CRC will be accumulated over these chunks. It is just prior to the first pass that the temp. accumulator need be initialized. -- Pete Lyall (OS9 Users Group VP)| DELPHI: OS9UGVP | Eaton Corp.(818)-706-5693 Compuserve: 76703,4230 (OS9 Sysop) OS9 (home): (805)-985-0632 (24hr./1200 baud) Internet: pete@wlbr.eaton.com UUCP: {scgvax,jplgodo,voder}!wlbr!pete