home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / amiga / programm / 13073 < prev    next >
Encoding:
Internet Message Format  |  1992-09-03  |  1.8 KB

  1. Path: sparky!uunet!munnari.oz.au!mel.dit.csiro.au!mineng.dmpe.CSIRO.AU!dmssyd.syd.dms.CSIRO.AU!metro!grivel!neumann.une.edu.au!cfiddyme
  2. From: cfiddyme@neumann.une.edu.au (Chris Fiddyment)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Assembly questions.
  5. Message-ID: <1802@grivel.une.edu.au>
  6. Date: 3 Sep 92 10:33:53 GMT
  7. Sender: usenet@grivel.une.edu.au
  8. Lines: 47
  9.  
  10.  
  11.   Hi,
  12.   I have a few (hopefully simple) questions to ask. I am new to assembler and
  13.   can't afford a book yet (besides a borrowed copy of the RKM's).
  14.  
  15.   First I am using the commands
  16.   
  17.       move.l  #186,d0
  18.       divu    #10,d0
  19.       moveq.l #0,d1
  20.       move.b  d0,d1
  21.  
  22.   to get d1 = 18. How canI get the remainder of the division (the upper part
  23.   of d0) into register d2. Is there some way to shift the register?
  24.  
  25.   Another question. I have written a program that opens a screen and moves a 
  26.   sprite around. How do I print images to the screen. I tried the following :
  27.  
  28.       move.l  intbase,a6
  29.       move.l  rastport,a1        ; these could be back to front.
  30.       lea     blockimage,a0
  31.       move.l  #10,d0
  32.       move.l  #10,d1
  33.       jsr    -114(a6)     ;DrawImage()
  34.  
  35. with the following variables:
  36.  
  37.    blockimage
  38.       dc.w 0,0,15,10,2       ; Is this the correct format. It seems right from
  39.       dc.l myimage           ; looking in the RKM's
  40.       dc.b 0,0
  41.       dc.l 0
  42.  
  43.    myimage
  44.      dc.w  %0000000000000000,%0000000000000000
  45.      ;10 lines of image data
  46.      dc.w  %0000000000000000,%0000000000000000
  47.  
  48. When the program is run the image is not drawn, the sprite dissapears from the
  49. screen but the sprite handling routines still work.
  50. What am I doing wrong??
  51. When I get some money what is a book on assembler to get?
  52.  
  53.    Thanks, Chris.
  54.  
  55. * Chris Fiddyment.             |   I never promised anybody *
  56. * cfiddyme@neumann.une.edu.au  |   anything.   Kermit.      *
  57.