Path: utzoo!attcan!uunet!husc6!ukma!rutgers!aramis.rutgers.edu!porthos.rutgers.edu!friedman From: friedman@porthos.rutgers.edu (Gadi ) Newsgroups: comp.sys.apple Subject: Re: MSB Confusion! Message-ID:Date: 28 Nov 88 15:25:05 GMT References: <8811221902.aa26542@SMOKE.BRL.MIL> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 61 > > From my machine language experience, I know for a fact that the Apple II line/ > > 65xx series processors store integers with the Least Significant Byte (LSB) > > first. I would assume that higher level number formats (like longints for > > example) would also be stored that way, because it would be easier to implement > > (you can use direct (not reversed) loads and stores). > > > > On an aside, the Mac line/ 68xxx series uses the MSB first. > > > > I hope that (finally) clears things up... > > > > -dan > > Boy, you know some strange facts. > Say you have the command > LDA $11ff -> 300:opcode 11 ff > In the apple. Hence, the MSByte is stored first. How did you say > you have been programming? Anyway, on a PC, the instruction > MOV A, $11ff -> 300:opcode ff 11 ... > Gadi > > BTW. Bfox wrote Emacs(Amacs) for the AppleII in assembly language, > so don't make fun of his 6502 programming!. > -- OK, it seems that I must eat my words!!! LDA $11ff -> 300:AD FF 11 and MOV A,$11FF -> 300:opcode 11 FF. Hence on the 6502, the MSB is stored last, and on the 80x86 its stored forst, thats what I get for switching between processors, and not checking my facts. Gadi PS Something new. Has anyone seen the Price of Apple Stock recently. $36 last Fri. Pretty low. Looks like Wallstreet is having a sale. a a a a a a a a a a a a a a a a a -- uucp: {ames, cbosgd, harvard, moss}!rutgers!aramis.rutgers.edu!friedman arpa: FRIEDMAN@ARAMIS.RUTGERS.EDU