Welcome, Guest. Please login or register.

Author Topic: Learning how to Program the Amiga  (Read 7691 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline ElPolloDiabl

  • Hero Member
  • *****
  • Join Date: May 2009
  • Posts: 1702
    • Show only replies by ElPolloDiabl
Re: Learning how to Program the Amiga
« Reply #29 from previous page: May 05, 2010, 01:57:58 AM »
Here's a link to Hello world for 68k Amiga:

http://www.helloworldexample.net/cisc-amiga-workbench-20-motorola-68000-hello-world-example.html

Here is some learning guides:

http://eab.abime.net/archive/index.php/t-21516.html

I think you should try some examples and see which one feels right to you. Once you get use to accessing the hardware you could probably switch over to C later.
Go Go Gadget Signature!
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Learning how to Program the Amiga
« Reply #30 on: May 05, 2010, 05:40:27 AM »
Quote from: Fanscale;556706
Here's a link to Hello world for 68k Amiga:

http://www.helloworldexample.net/cisc-amiga-workbench-20-motorola-68000-hello-world-example.html

And here's the fixed version of the same example:
Code: [Select]
       include lvo/exec_lib.i
        include lvo/dos_lib.i

        ; open DOS library
        movea.l  4.w,a6
        lea      dosname(pc),a1
        moveq    #36,d0
        jsr      _LVOOpenLibrary(a6)
        tst.l    d0
        beq.b    .nodos
        movea.l  d0,a6

        ; actual print string
        lea      hellostr(pc),a0
        move.l   a0,d1
        jsr      _LVOPutStr(a6)

        ; close DOS library
        movea.l  a6,a1
        movea.l  4.w,a6
        jsr      _LVOCloseLibrary(a6)
        moveq    #0,d0
        rts

.nodos:
        moveq    #20,d0
        rts

dosname     dc.b 'dos.library',0
hellostr    dc.b 'Hello, world!',0


Changes:
- Properly test for OpenLibrary failure. No longer crashes when run on KS 1.3.
- Set return code properly.
 

Offline tft666

  • Newbie
  • *
  • Join Date: Oct 2008
  • Posts: 32
    • Show only replies by tft666
    • http://www.po-rno.fi
Re: Learning how to Program the Amiga
« Reply #31 on: May 05, 2010, 09:18:59 AM »
A1200TOWER . Apollo1260-66Mhz 32Mb
====================================
www.po-rno.fi -  wcgraff.blogspot.com - blog.darklite.org