Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!ai-lab!rice-chex!bson From: bson@rice-chex.ai.mit.edu (Jan Brittenson) Newsgroups: comp.sys.handhelds Subject: Re: Questions about hp48 machine language Keywords: hp48, machine language, ml Message-ID: <15427@life.ai.mit.edu> Date: 30 Apr 91 03:57:18 GMT References: <42247@netnews.upenn.edu> Sender: news@ai.mit.edu Organization: nil Lines: 72 In a posting of [29 Apr 91 22:05:09 GMT] hoford@sequoia.circ.upenn.edu (John Hoford) writes: > Q2 > I have been using "MLDL 1.01" ... My problem is it does not have a > simple way of getting the starting address of a program in a variable. Recall the variable and pass the CODE object as an argument on level 1. > So the question: Does anyone have a program That returns the address > of the start of a stored program ?' In MLDL 1.02 the XLIB 1092 7 takes a code object and returns its address plus 10 in both level 1 and 2. So, to get the address of a CODE object in level 1 the following program can be used: \<< 1092 # 18CEAh SYSEVAL # 4035h SYSEVAL # 7E50h SYSEVAL EVAL DROP # 59CCh SYSEVAL 10 - \>> Notice that MLDL 1.02 must be attached, and it will *not* work with 1.01. > ie. > label ->addr 1: #213FF > Would the address change to quickly to be useful? It's a ROM address. It won't change. If it were a RAM address, then generally, the answer is no. Programs and directories move around much less than other objects. > The STAR assemblers seem to produce raw ml. Is their a progam which > will put them into a "asc->" or a "hp/kermit file" format? You can use the HEADER macro defined in hp48.star, it will create a kermit header. If you want a code object, you can use the CODE...ENDCODE macro. Just make sure to assemble with hp48.star. You can use the following skeleton: ;;+ ;; HP-48 ML Skeleton Program ;; ;; Assemble with hp48.star: ;; ;; % star listing binary hp48 skeleton ;; ;;- ; This is the kermit header. header ; This is a CODE...ENDCODE macro invocation. ; Don't break the code object into several files. code ; the code goes here move.a @d0, a ; Continue RPL thread add 5, d0 ; -- "" -- jump @a ; -- "" -- endcode ;;--- -- Jan Brittenson bson@ai.mit.edu