Welcome, Guest. Please login or register.

Author Topic: Learning 68K Assembler  (Read 3838 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Learning 68K Assembler
« on: April 02, 2009, 12:01:02 PM »
@ollygd
Quote
Plus, is the Motorola CPU emulated perfectly in WinUAE?

For most parts yes. There are some things that are not 100% but you'll probably never run into them.

Quote
Can I practice in WinUAE?

Yes.

Code: [Select]


_LVOOpenLibrary equ -552
_LVOCloseLibrary equ -414
_LVOOutput equ -60
_LVOWrite equ -48

Main:
    move.l (4).w,a6
    lea    (dosname,pc),a1
    moveq  #0,d0
    jsr    (_LVOOpenLibrary,a6)
    move.l d0,d7
    beq.b  .exit
    move.l d7,a6

    jsr    (_LVOOutput,a6)
    move.l d0,d1
    lea    (msg,pc),a0
    move.l a0,d2
    moveq  #-1,d3
.loop:
    addq.l #1,d3
    tst.b  (a0)+
    bne.b .loop
    jsr    (_LVOWrite,a6)

    move.l d7,a1
    move.l (4).w,a6
    jsr    (_CloseLibrary,a6)

.exit:
    moveq  #0,d0
    rts

dosname:
    dc.b   "dos.library",0
msg:
    dc.b   "Good luck with your studies!",10,0