Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site redwood.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!hao!hplabs!hpda!fortune!rhino!redwood!rpw3 From: rpw3@redwood.UUCP (Rob Warnock) Newsgroups: net.micro.68k Subject: Re: Why no INC or DEC Message-ID: <136@redwood.UUCP> Date: Tue, 22-Jan-85 07:54:32 EST Article-I.D.: redwood.136 Posted: Tue Jan 22 07:54:32 1985 Date-Received: Thu, 24-Jan-85 19:20:42 EST References: <242@talcott.UUCP> Organization: [Consultant], Foster City, CA Lines: 21 +--------------- | Why doesn't the 68000 have increment or decrement instructions? I know | that the 68000 was designed (at least to some degree) with the spirit of | RISC, but INC and DEC are actually quite simple, and useful, instructions. | Greg Kuperberg | harvard!talcott!gjk +--------------- It DOES! They're just not called that. Try looking at ADDQ and SUBQ (add and subtract "quick"). These are opcodes that can increment/decrement from one to eight. The constant (1-8) is buried in the op code. Much more useful than just INC and DEC, especially for stepping address pointers to bigger things than bytes. They work with any destination: data reg, address reg, memory; with byte, word, or long (except no byte adds to address regs). Rob Warnock Systems Architecture Consultant UUCP: {ihnp4,ucbvax!dual}!fortune!redwood!rpw3 DDD: (415)572-2607 USPS: 510 Trinidad Lane, Foster City, CA 94404