Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!batcomputer!munnari.oz.au!yoyo.aarnet.edu.au!sacomm!sturt.sacae.edu.au!cepurneekc From: cepurneekc@sturt.sacae.edu.au Newsgroups: comp.sys.acorn Subject: Message-ID: <1991Mar6.160100.2197@sturt.sacae.edu.au> Date: 6 Mar 91 05:30:59 GMT References: <1991Feb20.085225.11667@cl.cam.ac.uk> <5309@acorn.co.uk> <1779@svin02.info.win.tue.nl> <1991Feb26.110018.12714@abekrd.co.uk> <1991Mar1.113456.3297@ifi.uio.no> Organization: Flinders University of South Australia - Sturt Lines: 38 In article <1991Mar1.113456.3297@ifi.uio.no>, oystein@ifi.uio.no writes: > In article <1991Feb26.110018.12714@abekrd.co.uk>, garyb@abekrd.co.uk writes: >> source, pre-processes it and emits it to the BASIC assembler for assembly. >> Since every Archimedes comes with the ability to assemble in BASIC this >> would result in a very small assembler.... > Sounds a bit far fetched to me, perhaps. Remember also, that quite a few > of us need output in AOF, and the BASIC assembler can only produce absolute > code. ??? sorry, don't know what AOF stands for, but I'm quite certain that the BASIC assembler can produce non-absolute (relocatable) code. I too was wondering why BASIC's assembler was not getting much mention. Back in the 6502 days I was amazed what a hassle it was to get something done using an Apple (editor, linker etc.) vs the BBC's [LDA ASC("a")/JSR &FFEE/RTS]. Even the Acorn BASIC manual seems to keep its ease of use a bit of a secret; the entries for CALL and USR don't say much (for beginners :-)). What would it take to write assembly source routines in a format that made then reasonably usable by others? Maybe a DEFFNfoo indicating 'required' registers -- ie R0 for SWI Write_Char, 'needed' registers -- ie. how many are used by the procedure, and entry and exit states? If I want to use the routine it would be my responsibility to: STM stack,{list} ;store anything I'm using at the moment dummy=FNfoo ;which assembles the code for the routine ;a parameter list could assign 'needed' reginters? LDM stack,{list} ;restore the things I need. The assembly code equivalent of PRINT "a" is presumably a bit simpler than what most are writing, but I'd find DEFFN_256bitmultiply(x,y,p) a useful bit of code. (where x,y & p are pointers to the data). Are there many other BASIC/assembler fans out there? Carl Cepurneek