Shop OBEX P1 Docs P2 Docs Learn Events
Back to earth ... anyone have a PASM assembler? — Parallax Forums

Back to earth ... anyone have a PASM assembler?

jazzedjazzed Posts: 11,803
edited 2009-11-26 16:35 in Propeller 1
I want to compile an image that is directly executable from external RAM or flash.

Has anyone written a PASM assembler that might be leveraged to do this like an LMM assembler?
I prefer an open source project, but a "binary" that could have some features added is good too.
Obviously all jump like instructions and hub instructions would require COG primitives to operate.
Being able to compile PASM into a code block for loading COGs would be useful in the end.

Thanks

Comments

  • heaterheater Posts: 3,370
    edited 2009-11-24 03:00
    Over a year ago I started writing a PASM assembler. The idea was that it would be able to deal with all the content of all of Spins CON, VAR, DAT, blocks. Understanding the Spin data declarations which meant it would understand all Spin operators. Basically everything you can put in a Spin file except the Spin language it self.

    I pretty much got all the parsing done and was on the way to having an assembler.

    I gave up. Because I'm crazy I wrote the thing in ADA. Because I'm really crazy I used ADA's object oriented features. A first for me. The thing got to huge and complicated and then out comes HomeSpun and BST.

    You could pick that up to finish but I'm sure there are better options out there.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • BradCBradC Posts: 2,601
    edited 2009-11-24 03:18
    jazzed said...
    I want to compile an image that is directly executable from external RAM or flash.

    Has anyone written a PASM assembler that might be leveraged to do this like an LMM assembler?

    Isn't that pretty much how Catalina works with homespun?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you always do what you always did, you always get what you always got.
  • RossHRossH Posts: 5,519
    edited 2009-11-24 03:28
    @jazzed,

    I'm not clear on exactly what you're after. If you are willing to replace the jump instructions (etc) with various cog primitives, then I'm not clear on what is the difference is between what you are asking for and an LMM kernel executing ordinary PASM code? If you use the Catalina kernel, you can use it to execute any PASM compiled with Homespun - you just have to avoid a couple of specific instructions (details are given in the Catalina documentation). The PASM code doesn't have to include any LMM primitives if you don't need to use them - although you would probably want to at least use the LMM jump instructions (hub instructions are fine). If you want you could then remove the unused LMM kernel functions and use the extra space in the kernel cog for local variables. The Catalina kernel only offers 24 named longs as variables (plus a few others like SP, BC, FP, RI etc which normally have specific LMM uses) but that's because these are the only ones the C compiler needs to knows about - actually nothing to stop you adding more if you need them. Catalina also has an XMM loader that can load the kernel on boot (i.e. from EEPROM) and then start the Kernel executing a program directly from XMM. All you really need to do is replace the Catalina generated PASM code with your own hand-crafted PASM code.

    @heater,

    Hope your experience with Ada hasn't put you off too much. Ada is my all-time favorite language. People say that the learning curve is steep, but they tend not to mention that Ada also includes all the functions that are normally relegated to the system libraries, plus all the runtime support offered by an operating system or real-time kernel.

    In reality, the learning curve of Ada is not as steep as <insert any language here> + <insert any set of standard library functions here> + <insert any operating system or kernel here>. I hope sometime soon to get time to put a subset of Ada on the Prop - but I don't think it will be a very large subset. Maybe on the Prop II.


    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • RossHRossH Posts: 5,519
    edited 2009-11-24 03:29
    @Bradc,

    Looks like we cross posted!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • jazzedjazzed Posts: 11,803
    edited 2009-11-24 03:45
    Thanks for your thoughts guys.

    I do not want any HUB access unless explicitly called for by the ASM after startup except for a few longs used to accelerate the instruction fetches and some primitives that allow HUB access and provide buffer copy accelerators. I prefer the HUB be entirely available for the user after startup for things like video buffering or other data intensive applications.

    I'll look at Catalina again especially as a Platform Environment for all the C lovers (includes me), but from what I remember, it is not really what I'm looking for. ImageCraft stuff is very restrictive in the kernel (to my needs at least), so I won't bother with that.

    @heater thanks for the ADA offer, but that's not in my repertoire of languages, so I guess I'll pass. You may be happy to know that I've at least considered some emulation though [noparse]:)[/noparse]

    Thanks,
    --Steve
  • heaterheater Posts: 3,370
    edited 2009-11-24 03:55
    I actually like ADA and am very sad it's not in more general use. Many people don't get on with its rigorous type checking and such but I think that's all good stuff.

    ADA is a big language, there is a lot in it.

    I got stuck on the object oriented aspects of it. Just could not get my tagged records and polymorphism organized nicely.

    I was relying on some very nice tutorials on the WEB by a professor from the states. He ended up describing ADA as "absurd" when his object oriented example code did not do what he expected. I eventually worked out that his example was wrong and was trying to do polymorphism in totally he wrong way.

    At this point I concluded that if these features are so hard to use that a comp. sci. professor does not understand them then my life is to short to be trying to work with them.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • RossHRossH Posts: 5,519
    edited 2009-11-24 04:28
    @jazzed,

    Let me know if there's anything I can do to help.

    @heater,

    Yes - Ada requires you to have a fair idea of the principles behind object orientation even before you start. C++ tries to hide the reality of OO from the programmer, whereas Ada puts it very much "in your face" - in part, I think that's deliberate on behalf of the Ada language designers - the features are there if you want them, but you'd better have a damn good reason for using them, because the run-time costs are very, very, high (something which most people don't seem to realize). Ada is also a bit obscure about the object oriented syntax - especially if you're not familiar with the whole Ada feature set, and start out using the wrong constructs. Many things that need OO solutions in other languages have better non-OO solutions in Ada - for example, don't use polymorphism to achieve something when generics can achieve the same thing but without the run-time overhead.


    I find that in C (or C++) you can get any program to compile in a few minutes, but you typically then spend a year getting it to work properly. In Ada you can easily spend days just getting your program to compile (and you sometimes need to redesign it to do so!) - but once you do, it quite often just works. When you first see this phenomenon on a large, complex, multi-person project you tend to congratulate yourselves on how good a team of programmers you must be. After a while you realize most of it is down to the language itself - and the fact that you no longer have to fight with poorly designed and poorly implemented operating systems.

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • Bill HenningBill Henning Posts: 6,445
    edited 2009-11-24 06:49
    Hi jazzed,

    See mikronauts.com/software-products/las-largos-lmm-assembler/

    There will probably be a new release in a month or two, as I use LAS to assemble the code PropellerBasic generates.

    Best Regards,

    Bill
    jazzed said...
    I want to compile an image that is directly executable from external RAM or flash.

    Has anyone written a PASM assembler that might be leveraged to do this like an LMM assembler?
    I prefer an open source project, but a "binary" that could have some features added is good too.
    Obviously all jump like instructions and hub instructions would require COG primitives to operate.
    Being able to compile PASM into a code block for loading COGs would be useful in the end.

    Thanks
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
    Morpheusdual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory IO board kit $89.95, both kits $189.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
  • jazzedjazzed Posts: 11,803
    edited 2009-11-24 07:23
    Thanks Bill.

    Do you have a functional example test application like "Hello World!" I can study?
    The kernel primitives sound simple, but an example of that would be an excellent start.
    Firm examples are good for sanity check and helping decipher unexpected behavior.
    Is LIBCALL a "user" primitive?

    Thanks,
    --Steve
  • HumanoidoHumanoido Posts: 5,770
    edited 2009-11-24 07:29
    heater said...
    Over a year ago I started writing a PASM assembler. The idea was that it would be able to deal with all the content of all of Spins CON, VAR, DAT, blocks. Understanding the Spin data declarations which meant it would understand all Spin operators. Basically everything you can put in a Spin file except the Spin language it self. I pretty much got all the parsing done and was on the way to having an assembler. I gave up. Because I'm crazy I wrote the thing in ADA. Because I'm really crazy I used ADA's object oriented features. A first for me. The thing got to huge and complicated and then out comes HomeSpun and BST. You could pick that up to finish but I'm sure there are better options out there.
    Was this ADA on the Propeller chip? How did you do that?

    humanoido
  • AleAle Posts: 2,363
    edited 2009-11-24 11:17
    you can use the assembler in pPropellerSim. It now supports multiline comments and has a much better parser. I have to update the standalone version though. Where is it again ? in some other computer i think...

    It generates a bin file and a list file smile.gif automatically.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Visit some of my articles at Propeller Wiki:
    MATH on the propeller propeller.wikispaces.com/MATH
    pPropQL: propeller.wikispaces.com/pPropQL
    pPropQL020: propeller.wikispaces.com/pPropQL020
    OMU for the pPropQL/020 propeller.wikispaces.com/OMU
  • heaterheater Posts: 3,370
    edited 2009-11-24 12:36
    @RossH.

    Yep, I hear what you say about ADA. I think one of the biggest problems in getting into ADA is actually the language that is used to talk about it rather than ADA itself. "incomplete types" rather than "virtuall classes" or whatever. That's a big hurdle when coming from a C/C++ experience. I did find somewhere and "ADA for C++" programmers site that attempted to overcome this.

    I do like the idea that ADA is fussy. In the old days you could throw any "line noise" at a C compiler and end up with an executable. Then what? Break out the debugger and and spend a week finding out what it really does[noparse]:)[/noparse]

    On the other hand having to rewrite everything to get what I really mean to compile takes a lot of work.

    What you say is quite encouraging, I may revisit my assembler one day. If only as an ADA exercise. Shame to throw it away as encoded in there is a lot of stuff about parsing the quirky spin syntax.

    ADA on the Prop would be an amazing feat. Years ago we used ADA on the 16 bit Intel 186 chips. Three of them in a hand held box. There is even an ADA for AVR and an ADA for the Z80 so it must be doable to some level.

    If I understand correctly there are already some ADA subsets defined for smaller real-time systems. "Spark ADA", is it, for example.

    @Humanoido,

    I thought your ears would be pricking up at this[noparse]:)[/noparse]
    No my assembler, written in ADA, was to be run on a PC to generate COG code from normal Spin files as input. Ignoring any actual Spin language it was to understand PASM and VAR and CON sections etc.

    Looks like RossH is looking at another item for your list though [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • RossHRossH Posts: 5,519
    edited 2009-11-24 13:01
    @heater,

    Yes, "Spark Ada" is a subset of Ada. I've never used it, but it is not primarily for small systems. It is the subset of the Ada language that is formally verifiable (e.g. using an automated program prover). Ada has some non-deterministic aspects - such as some of the tasking constructs - that I believe have to be disallowed if you want to formally prove that the program will accomplish its goal in some finite time. It is used in ultra-ultra-critical systems where it has to be formally shown that the program does exactly the job it was designed for (and nothing else) before it is allowed to be deployed.

    I also had my first Ada compiler on a single 80x86 - ran quite well, as far as I can remember.

    I don't know that I'll be the one to do it, but I'm fairly sure we'll get it on the Prop someday!

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • jazzedjazzed Posts: 11,803
    edited 2009-11-24 17:55
    Ale said...
    you can use the assembler in pPropellerSim. It now supports multiline comments and has a much better parser. I have to update the standalone version though. Where is it again ? in some other computer i think...

    It generates a bin file and a list file smile.gif automatically.
    @Ale, I didn't realize that had an assembler. Nice.
    I look forward to an update. Please post a link when ready.

    Thanks
  • Bill HenningBill Henning Posts: 6,445
    edited 2009-11-24 19:50
    Hi Steve,

    Examples will be coming soon.

    I am currently swamped with work (two "rush" consulting gigs (industrial, Propeller based), PropellerBasic, prototype PCB's for four new products coming in over next couple of weeks... oops did that slip out?)

    Please note PropellerBasic will be generating .las files with the basic code as a comment followed by the LMM assembly code for it, it will be a great way of making examples smile.gif

    SYSCALL is for calling Largos system services (stdio, file system, etc)
    LIBCALL is for calling user library routines

    I still intend to release a "preview" of PropellerBasic, with some docs, on Dec.24 of this year smile.gif

    (sleep is optional, and working so much would risk my marriage if I did not have such a terrific, understanding, wifey)

    Some time before then I can post a few simple .las files, things like blinking an LED.

    Best Regards,

    Bill
    jazzed said...
    Thanks Bill.

    Do you have a functional example test application like "Hello World!" I can study?
    The kernel primitives sound simple, but an example of that would be an excellent start.
    Firm examples are good for sanity check and helping decipher unexpected behavior.
    Is LIBCALL a "user" primitive?

    Thanks,
    --Steve
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
    Morpheusdual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory IO board kit $89.95, both kits $189.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
  • Bill HenningBill Henning Posts: 6,445
    edited 2009-11-24 19:50
    That sounds fantastic, must check it out...
    Ale said...
    you can use the assembler in pPropellerSim. It now supports multiline comments and has a much better parser. I have to update the standalone version though. Where is it again ? in some other computer i think...

    It generates a bin file and a list file smile.gif automatically.
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
    Morpheusdual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory IO board kit $89.95, both kits $189.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
  • jazzedjazzed Posts: 11,803
    edited 2009-11-24 20:32
    Bill Henning said...

    Some time before then I can post a few simple .las files, things like blinking an LED.
    This would be a really big help if I get into trouble.

    Having a kernel compatible with your Basic or any other LAS emitter would be useful.

    What is your current XMM MIPS rate on a 10ns SRAM Morpheus? Just curious [noparse]:)[/noparse]
    I see you adopted our 8 instruction long fetcher in your cache reader ... nice work.

    @RossH will you be emitting LAS with Catalina?

    Thanks.
  • RossHRossH Posts: 5,519
    edited 2009-11-24 22:41
    @jazzed,

    I haven't decided yet - I intend having a look at LAS when it is a bit more mature. It certainly won't be in the initial release of Catalina for Morpheus (which should be out Real Soon NowTM).

    One thing I'm finding is that as Catalina supports more and more platforms, I'm making much slower progress on the core functionality. This is because of the complexity of the platform-specific code for the more complex XMM multi-prop platforms like the TriBladeProp and Morhpeus. Morpheus on Homespun is in progress (and I'll finish it if it kills me!) but also supporting Morpheus on LAS may simply be a bridge too far.

    Nothing to stop someone else doing it, of course - the Catalina code generator and binder (which are the components that would need to change) are fully GPL'd.

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • Bill HenningBill Henning Posts: 6,445
    edited 2009-11-24 23:20
    I will post some simple examples as soon as consulting work allows [noparse]:)[/noparse]

    XMM MIPS on 10ns ram... have not done it yet, but I have a crazy idea for a five-cog cache engine that might get XLMM to be almost as fast as LMM from the hub [noparse]:)[/noparse]

    And I have some truly insane ideas for Morpheus 2 (Prop2 version of Morpheus).

    Yes, thanks, I did smile.gif Great work guys.

    Actually I adopted it twice, and interleaved it - that's how I get 20MB/sec bursts from my XMM for frame buffer refresh! (with a third cog supplying some address information)

    With the 10ns ram, and two more cogs, I believe I can easily do 40MB/sec bursts, and 80MB/sec is not entirely out of the question.
    jazzed said...
    Bill Henning said...

    Some time before then I can post a few simple .las files, things like blinking an LED.
    This would be a really big help if I get into trouble.

    Having a kernel compatible with your Basic or any other LAS emitter would be useful.

    What is your current XMM MIPS rate on a 10ns SRAM Morpheus? Just curious [noparse]:)[/noparse]
    I see you adopted our 8 instruction long fetcher in your cache reader ... nice work.

    @RossH will you be emitting LAS with Catalina?

    Thanks.
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
    Morpheusdual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory IO board kit $89.95, both kits $189.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
  • mikedivmikediv Posts: 825
    edited 2009-11-24 23:32
    Heater I am un-clear is there a version of ADA that runs on the Prop Platform?? Or are you just compiling ADA code on your PC for the Prop??
  • heaterheater Posts: 3,370
    edited 2009-11-24 23:47
    Mikediv,

    There is a version of ADA that runs on the Propeller. As you may have guessed it runs under CP/M under ZiCog[noparse]:)[/noparse] It is the Janus ADA compiler. If you want to play with it I could put some instructions together. Yep, with WordStar now working on the Prop you can develop ADA code on the Prop!

    My attempt at a Prop assembler is compiled and run on the PC. It is far to big for Janus on a Z80 with 64K RAM I think. Besides it is written in a much more recent dialect of ADA than Janus supports. I suspect Janus only ever implemented a subset of ADA anyway.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • AleAle Posts: 2,363
    edited 2009-11-25 14:57
    I updated pPropellerSim at sourceforge.net/projects/ppropellersim. From the command line you can assemble directly. Note that it does not add any stub (Spin stub). Just pure asm smile.gif.

    java -jar pPropellerSim <nameofthefile>

    A file with extension ".bin" and another one with ".lst" are created matching the
    name of the source.
    The error message is displayed and written to the list file too.


    I have to peek into Bill's LAS to see which features I can implement.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Visit some of my articles at Propeller Wiki:
    MATH on the propeller propeller.wikispaces.com/MATH
    pPropQL: propeller.wikispaces.com/pPropQL
    pPropQL020: propeller.wikispaces.com/pPropQL020
    OMU for the pPropQL/020 propeller.wikispaces.com/OMU
  • jazzedjazzed Posts: 11,803
    edited 2009-11-26 05:05
    Ale said...
    I updated pPropellerSim at sourceforge.net/projects/ppropellersim. From the command line you can assemble directly. Note that it does not add any stub (Spin stub). Just pure asm smile.gif.
    @Ale,
    Thanks for that. I was able to start the program, but have not used it yet.
    I have an LMM interpreter I can use for testing with your program maybe Friday.

    @Bill,
    I'm attaching a "blinky.asm" that I think should work. LAS compiles, but the .lst output is mysterious.
    Have a look and fix it if you have time.

    '-----------------------------------------------------------------------------
    ' LAS blinky.asm
    '
    ' Use LAS to blink Propeller pins P[noparse][[/noparse]0:27]
    '
    '-----------------------------------------------------------------------------
    
            output  image           ' eeprom image file
    
    '-----------------------------------------------------------------------------
    ' startup code
    '
            org         0
    
    HZ      long        5000000         ' clock speed in HZ
    CR      byte        4               ' clock mode
    CS      byte        0               ' checksum (to 0)
    PBASE   word        $0010           ' must be $0010
    VBASE   word        $1000           ' number of longs loaded
    DBASE   word        $0018           ' first word above markers
    PCURR   word        $0020           ' spin code to execute
    DCURR   word        $0010           ' point to local stack
    LNG1    long        $FFF9FFFF       ' below local stack must be $FFF9FFFF
    LNG2    long        $FFF9FFFF       ' below local stack must be $FFF9FFFF
    STRTUP  byte        $35             ' push #0
            byte        $37,$04         ' push #$20
            byte        $35             ' push #$18
            byte        $2C             ' coginit(0,$20,0)
            byte        0, 0, 0         ' filler
    '
    '-----------------------------------------------------------------------------
    
    '-----------------------------------------------------------------------------
    ' Las register definitions
    '-----------------------------------------------------------------------------
    
    ' COG register definitions
    
    PAR     EQU         $1F0
    CNT     EQU         $1F1
    INA     EQU         $1F2
    INB     EQU         $1F3
    OUTA    EQU         $1F4
    OUTB    EQU         $1F5
    DIRA    EQU         $1F6
    DIRB    EQU         $1F7
    CTRA    EQU         $1F8
    CTRB    EQU         $1F9
    FRQA    EQU         $1FA
    FRQB    EQU         $1FB
    PHSA    EQU         $1FC
    PHSB    EQU         $1FD
    VCFG    EQU         $1FE
    VSCL    EQU         $1FF
    
    ' LMM register definitions
    
    LMMBASE     EQU     $0
    LMMFCACHE   EQU     $080
    LMMDCACHE   EQU     $100
    LMMREGS     EQU     $180
    
    PC          EQU     $1E0    ' Program Counter
    SP          EQU     $1E1    ' Stack Pointer
    BP          EQU     $1E2    ' Base Pointer
    FLAGS       EQU     $1E3    ' Flags
    R0          EQU     $1E4    ' General Purpose Register, also TOS
    R1          EQU     $1E5    ' General Purpose Register
    R2          EQU     $1E6    ' General Purpose Register
    R3          EQU     $1E7    ' General Purpose Register
    R4          EQU     $1E8    ' General Purpose Register
    R5          EQU     $1E9    ' General Purpose Register
    R6          EQU     $1EA    ' General Purpose Register
    R7          EQU     $1EB    ' General Purpose Register
    R8          EQU     $1EC    ' General Purpose Register
    R9          EQU     $1ED    ' General Purpose Register
    R10         EQU     $1EE    ' General Purpose Register
    R11         EQU     $1EF    ' General Purpose Register
    TOS         EQU     $1E4    ' Top of Stack register
    
    
    '-----------------------------------------------------------------------------
    ' blinky code
    '
            cog 0
    start   
    
        LDI    R0,   $fffffff
        or     DIRA, R0
    loop
        xor    OUTA, R0
        jmp    loop
    
        end
    '
    '-----------------------------------------------------------------------------
    
    


    Slipping into holiday mode now. Happy Thanksgiving!
  • AleAle Posts: 2,363
    edited 2009-11-26 08:51
    I thought jmp needed a '#' for an immediate literal... not anymore ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Visit some of my articles at Propeller Wiki:
    MATH on the propeller propeller.wikispaces.com/MATH
    pPropQL: propeller.wikispaces.com/pPropQL
    pPropQL020: propeller.wikispaces.com/pPropQL020
    OMU for the pPropQL/020 propeller.wikispaces.com/OMU
  • Bill HenningBill Henning Posts: 6,445
    edited 2009-11-26 16:34
    Thanks, I will check it out.

    Happy Thanksgiving!
    jazzed said...
    Ale said...
    I updated pPropellerSim at sourceforge.net/projects/ppropellersim. From the command line you can assemble directly. Note that it does not add any stub (Spin stub). Just pure asm smile.gif.
    @Ale,
    Thanks for that. I was able to start the program, but have not used it yet.
    I have an LMM interpreter I can use for testing with your program maybe Friday.

    @Bill,
    I'm attaching a "blinky.asm" that I think should work. LAS compiles, but the .lst output is mysterious.
    Have a look and fix it if you have time.

    '-----------------------------------------------------------------------------
    ' blinky code
    '
            cog 0
    start   
    
        LDI    R0,   $fffffff
        or     DIRA, R0
    loop
        xor    OUTA, R0
        jmp    loop
    
        end
    '
    '-----------------------------------------------------------------------------
    
    


    Slipping into holiday mode now. Happy Thanksgiving!
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
    Morpheusdual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory IO board kit $89.95, both kits $189.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
  • Bill HenningBill Henning Posts: 6,445
    edited 2009-11-26 16:35
    You are correct for "small model" ie regular pasm code, but I can't remember if it is used for my LMM jumps... will check.

    Happy Thanksgiving!
    Ale said...
    I thought jmp needed a '#' for an immediate literal... not anymore ?
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
    Morpheusdual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory IO board kit $89.95, both kits $189.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
Sign In or Register to comment.