Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!jarthur!jarthur.claremont.edu From: bgribble@jarthur.claremont.edu (Bill Gribble) Newsgroups: comp.sys.handhelds Subject: assembly wierdness Message-ID: <9811@jarthur.Claremont.EDU> Date: 27 Nov 90 00:15:58 GMT Sender: bgribble@jarthur.Claremont.EDU Organization: Harvey Mudd College, Claremont, CA 91711 Lines: 56 Let me disclaim by saying that I already know that the answer to this question is a one-liner on the order of 'set file type to binary, you fool.' (that's *not* the answer, by the way - just something equally stupid.) After compiling a simple program in asap - well, here it is: ---------------------------------------- push_r0_short=#06537 data.a #02d9d ; PRG data.a #02dcc ; mcode segment 1 pt1beg: data.a pt1end-pt1beg ; size of object call.3 push_short1 move.a @d0,a add.a 5,d0 jump.a @a pt1end: data.a #02dcc pt2beg: data.a pt2end-pt2beg move.a @d0,a add.a 5,d0 jump.a @a push_short1: clr.w a inc.a a move.w a,r0 call.a push_r0_short ret pt2end: data.a #0312b ; END ------------------------------------------------------ I'm just trying to test whether the intuitive assumption that code can be called between objects is true - of course it is, but that's not the point. When I assemble and download, I get an object that looks like Code Code on the stack - just what you'd expect. But when I hit the softkey labeled 'TEST2', which is where it's stored, I get 'TEST2' on level 2 and Code Code on level 1 rather than having the code evaluated. Hitting the EVAL key gives 'TEST2' on level 4, Code Code on 3, EVAL (no delimiters) on 2, and <1h>, the intended result, on level 1. What gives? I think it's my exit code failing to do the right thing, but it follows logic, examples, and past experience pretty well, so I don't know. Any help would be appreciated. ***************************************************************************** ** Bill Gribble Harvey Mudd College, Claremont, CA ** ** bgribble@jarthur.claremont.edu Never heard of it? You're stupid. ** *****************************************************************************