Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!sdd.hp.com!news.cs.indiana.edu!ariel.unm.edu!cie!jlavin From: jlavin@cie.uoregon.edu (Jeff Lavin) Newsgroups: comp.sys.amiga.programmer Subject: Re: Macro-68 Questions Keywords: Assembler Message-ID: <1991May10.084719.14832@ariel.unm.edu> Date: 10 May 91 08:47:19 GMT References: <1991May8.205935.26761@unislc.uucp> Sender: Jeff Lavin Reply-To: jlavin@cie.UUCP (Jeff Lavin) Organization: The Puzzle Factory Lines: 56 In article <1991May8.205935.26761@unislc.uucp> ttobler@unislc.uucp (Trent Tobler) writes: >From article , by mykes@amiga0.SF-Bay.ORG (Mike Schwartz): > >>>2) Is bhs.s the same as bhi.s followed by beq.s? That is what >>> I assumed, bhs is not a true 68000 opcode in any case. >>> >> >> bhs.s means "branch higher or same" and it IS a true 68000 opcode. It >> is an unsigned branch while bge is signed. > >No, it is not a true 68000 opcode. The branching instructions are: > >Cond. >0000 BRA always >0001 --- used for the BSR instruction >0010 BHI C and Z clear >0011 BLS C or Z set >0100 BCC C clear >0101 BCS C set >0110 BNE Z clear >0111 BEQ Z set >1000 BVC V clear >1001 BVS V set >1010 BPL N clear >1011 BMI N set >1100 BGE N = V (ie both set or both clear) >1101 BLT N != B (ie one is set and one is clear) >1110 BGT Z clear, and N = V >1111 BLE Z set, and N != V > >> These are not anomalies, and you should find these "basic" features in any >> assembler you consider using. They were in the oldest Metacomco assembler >> available... > >So what do the assemblers do? Generate a BHI and BEQ sequence? > >- > Trent Tobler - ttobler@csulx.weber.edu Simple, BHS is equivalent to BCC (unsigned). Because of the user configuration file, Macro68 allows you to rename all directives and opcodes. This allows both a large amount of compatibility with other assemblers, and a lot of flexibility. Some folks have reported renaming the signed branches in order to make it easier for them to remember which are signed and which are unsigned. Whatever you call it, on the 68K family of processors, BCC is equivalent to an unsigned Branch Higher or Same, and BCS is equivalent to an unsigned Branch Lower. The Puzzle Factory, Inc. | Jeff Lavin -- jlavin@cie.uoregon.edu Veneta, Oregon |------------------------------------- Voice : (503) 935-3709 | Remainder of signature line Data : (503) 935-7883 | under construction.