home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!destroyer!gatech!rutgers!cbmvax!mks
- From: mks@cbmvax.commodore.com (Michael Sinz)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Assembly questions.
- Message-ID: <34906@cbmvax.commodore.com>
- Date: 4 Sep 92 21:06:29 GMT
- References: <1802@grivel.une.edu.au>
- Reply-To: mks@cbmvax.commodore.com (Michael Sinz)
- Organization: Commodore, West Chester, PA
- Lines: 58
-
- cfiddyme@neumann.une.edu.au (Chris Fiddyment) writes:
- >
- > Hi,
- > I have a few (hopefully simple) questions to ask. I am new to assembler and
- > can't afford a book yet (besides a borrowed copy of the RKM's).
- >
- > First I am using the commands
- >
- > move.l #186,d0
- > divu #10,d0
- > moveq.l #0,d1
- > move.b d0,d1
-
- You really should do a move.w d0,d1 here...
-
- >
- > to get d1 = 18. How canI get the remainder of the division (the upper part
- > of d0) into register d2. Is there some way to shift the register?
-
- Simple:
-
- moveq.l #0,d2
- swap d0
- move.w d0,d2
-
- > Another question. I have written a program that opens a screen and moves a
- > sprite around. How do I print images to the screen. I tried the following :
- >
- > move.l intbase,a6
- > move.l rastport,a1 ; these could be back to front.
- > lea blockimage,a0
- > move.l #10,d0
- > move.l #10,d1
- > jsr -114(a6) ;DrawImage()
- >
- >with the following variables:
- >
- > blockimage
- > dc.w 0,0,15,10,2 ; Is this the correct format. It seems right from
- > dc.l myimage ; looking in the RKM's
- > dc.b 0,0
- > dc.l 0
- >
- > myimage
- > dc.w %0000000000000000,%0000000000000000
- > ;10 lines of image data
- > dc.w %0000000000000000,%0000000000000000
-
- myimage must be loaded into CHIP ram... This can be done in a number of ways
- including by putting it into its own section and defining it as CHIP.
-
- /----------------------------------------------------------------------\
- | /// Michael Sinz - Senior Amiga Systems Engineer |
- | /// Operating System Development Group |
- | /// BIX: msinz UUNET: mks@cbmvax.commodore.com |
- |\\\/// When people are free to do as they |
- | \XX/ please, they usually imitate each other. |
- \----------------------------------------------------------------------/
-