Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: inline assembler problem

  1. #11

    inline assembler problem

    If anybody can compile the above code,
    would this person please upload his ppcarmnds.exe
    somewhere, so i can use it? that would be great.

    i can hack my way through, mixing pascal and assembler,
    but it's like carrying a rock with me, when i'm trying to
    win a marathon :D

  2. #12

    inline assembler problem

    I have tried some old versions (and my last build too), but I get same error.
    Maybe you could try to join #fpc irc channel and ask there, but AFAIK fpk is on holiday, so I don't know if you will get help.
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  3. #13

    inline assembler problem

    Some further investigations
    This code (I don't know what it does!) compiles fine:
    [pascal]var
    test: longint;
    procedure MyAsmProc(); assembler;
    asm
    ldr r0,.Ltest
    .Ltest:
    .long test
    end;
    [/pascal]

    Stated that I don't know arm assembly at all, are you sure that your calls are right?
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  4. #14

    inline assembler problem

    In the last couple of hours I have written at least
    250-300 lines of Pascal-Code to achieve what i want to do.

    Now i can scrap them.

    ALL OF THEM!

    YOU, SIR... YOU...

    ... are the most BRILLIANT person EVER :D

    How did you think of that??? WHY THE HELL DIDN'T I THINK OF THAT!! lol

    thank you SO much! :DDDD
    Actually, without you, i wouldn't even code all this stuff :D

    OMFG! lol This is SO great! :DD
    If you ever come to Austria/Vienna, you'll get a beer from me! :DD

    Thank You Thank You Thank You!!! :DD

    ps: no, i won't scrap them *g* i will at least finish what i've started and
    then recode everything lol ... and yeah, i'm acting like a kid right now :DD

  5. #15

    inline assembler problem

    I only had a look at the biggest source of pascal coding examples: fpc sources :mrgreen:
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  6. #16

    inline assembler problem

    OMG lol

    maybe i should stop all this and go sell flowers or something lol

    i mean ... i am currently writing a dynamic code generator (this is really,
    really easy, actually :D) but i totally surrender when i run into problems
    like the above one lol

    hey... say, can i help YOU in any way? :D

  7. #17

    inline assembler problem

    Of course you can help!
    The biggest help could be to spread the world about free pascal for nds/gba, maybe releasing code snippets, tutorials, examples, complete apps/games and so on. I think that your emulator will be a good "business card" for fpc
    [size=9px]
    PS. I have added my previous answer to fpc community too, because it needs some "vitamines" in order to grow :lol: [/size]
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  8. #18

    inline assembler problem

    i am sorry to probably dissapoint you, but i normally don't do these kind of things. i do not even have a homepage... never had one lol

    i can, if i'm a bit more into the nds, write some optimization-tutorials (i am a clock-cycle-speed-freak) or something like that, provided there
    is space where i can put them online. :D

    besides, i am using pascal more and more as frame for assembler (because
    it produces slow code), so my emulator wouldn't be any help *g* but
    that's far from now and i am not the kind of guy who doesn't want to
    give something back, so we will see on this one :)

    what i have actually meant is, if i can help YOU in any way, ie go bug
    hunting, optimize code, anything like that which helps you achieve your
    goal, just tell me. i will help you as you are helping me to achieve mine.

    but i am not "advertising" a "product", sorry :)

    oh, btw, bug-hunting ... does this address you? ->

    this line:

    mla r0,r1,r2,r3

    gives me: "Syntax error while trying to parse a shifter operand"

    mla does a multiply+add. it multiplys r1 with r2, adds r3 and puts
    everything into r0.

    and it seems that the compiler does not recognize some opcodes like
    lsl or ror, which should be known ...

    does this address you?

    edit: "fpc produces slow code" ... i hope nobody takes this personal,
    in my opinion every compiler produces slow code, unless you write your
    code in a way the compiler can handle it better ... which i do not do, as i
    do not see any sense in doing that, because, as i think, one should know
    his platform and how the cpu works, instead of relying on a compiler to do
    the work for you. this is especially true on fixed platforms like the nds.

  9. #19

    inline assembler problem

    Bug hunting is a big help; thanks to your suggestion we have already resolved a couple of rtl related bugs.

    I had some issues with lsl too, but I'm not too much in compiler code, so my suggestion is to report these bugs in Mantis bug tracker
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  10. #20

    inline assembler problem

    did so. hope everything was right.

    as far as tutorials go, i am still reading the arm946e-s technical reference
    manual (it's a great read, 232 pages) and i think i am able to produce
    something useful for the community :D ... but not today, as my mother
    need's my nds for playing new super mario bros lol

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •