Xref: utzoo comp.os.os9:296 comp.sys.m6809:979 Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!purdue!gatech!ncar!ames!pacbell!att!ihlpl!knudsen From: knudsen@ihlpl.ATT.COM (Knudsen) Newsgroups: comp.os.os9,comp.sys.m6809 Subject: Re: BASIC09 quirk Summary: Byte vs Integer Keywords: byte Message-ID: <8083@ihlpl.ATT.COM> Date: 9 Dec 88 16:56:41 GMT References: <497@pacsbb.UUCP> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 30 Nah, no helpful comments, just more addition to the confusion. My experience is that you can pass Bytes as parameters to functions with no problems. However, there is the quirk of Motorola's (aka Rotorooter's) "big-endian" storage of multi-byte numbers in memory. Usually this just means that you have to have perfect agreement between your calling and called procedures' declarations (don't feed a Byte to a proc expecting Integer, and the reverse). Otherwise values can get multiplied or divided by 256. The pain is that if a function foo expects Byte, you can't call it with a numeric constant, eg as RUN foo(43). Because B09 takes 43 as an Integer constant, so foo() sees only its high byte, which in this case is 0. So to do the above you need: DIM beans:BYTE ... beans = 43 foo(beans) which is a waste in an already too verbose language. I'm interested that PACKed procedures worked better for you. My experience is that PACKing ruins the system's ability to find and link to the machine-code fcns like INKEY and SYSCALL, so I never use PACK. -- Mike Knudsen Bell Labs(AT&T) att!ihlpl!knudsen "Lawyers are like nuclear bombs and PClones. Nobody likes them, but the other guy's got one, so I better get one too."