flee@gondor.cs.psu.edu (Felix Lee) (02/17/88)
In article <903@micomvax.UUCP> ray@micomvax.UUCP (Ray Dunn) writes: >In article <3487@ihlpf.ATT.COM> nevin1@ihlpf.UUCP (00704A-Liber,N.) writes: >> .... About 7 years ago, I disassembled the BASIC ROMs on my TRS-80 Model I >> I noticed a curious piece of code (which I will pseudocode here): >> [...] >Without examining it too closely, it seems to me that it is MUCH more likely >that you are disassembling on the wrong boundaries than the code is jumping >into the middle of instructions!! Interpreting binary dumps can be VERY >misleading! With all due respect, the TRS-80 *did* use this trick. One instance was the TRS-80 Basic SET and RESET instructions (which turned on/off a pixel on the screen). The SET instruction would have an entry point at 0200: 0200 06 00 LD A,00 0202 01 06 01 LD BC,0106 ; this is just junk 0205 ; real code starts here and the RESET instruction would start at 0203: 0203 06 01 LD A,01 0205 ; real code starts here [numbers are approximate] Multiple entry points without the overhead of branches. -- Felix Lee flee@gondor.cs.psu.edu *!psuvax1!gondor!flee