LISTING6.TXT
**********************************************************************
* *
* 68000 ASSEMBLER COURSE ON ATARI ST *
* *
* by The Ferocious Rabbit (from 44E) *
* *
* Second series *
* *
* Listing number 6 *
**********************************************************************
INCLUDE "B:\START.S"
MOVE.L #MESSAGE,-(SP) hello and clear screen
MOVE.W #9,-(SP)
TRAP #1
ADDQ.L #6,SP
DC.W $A000 A-line initialization
* Using A0 (return from function $A000) we get
* the address of the different arrays
* 4(A0) gives the address of the Contrl array
* 8(A0) gives the address of the Int_in array
* 12(A0) gives the address of the Ptsin array
* 16(A0) gives the address of the Intout array
* 20(A0) gives the address of the Ptsout array
MOVE.L 8(A0),A3 save address of Int_in
MOVE.L 12(A0),A4 save address of Ptsin
* We pass the coordinates of the point whose color we want
* Of course, we pass these coordinates in Ptsin.
MOVE.W #100,(A4)
MOVE.W #122,2(A4)
DC.W $A002 request color of a pixel
* Function $A002 returns the color of the pixel in D0, we then recolor
* another pixel with the color of the first
MOVE.W #100,(A4)
MOVE.W #123,(A4)
MOVE.W D0,(A3) color of course in INT_IN
DC.W $A001 coloring of a pixel
MOVE.W #7,-(SP) wait for key press
TRAP #1
ADDQ.L #4,SP
MOVE.W #0,-(SP) and bye bye
TRAP #1
*---------------------------------------*
SECTION DATA
MESSAGE DC.B "Pixel coloring with A-line",0
SECTION BSS
DS.L 100
PILE DS.L 1
END
Back to ASM_Tutorial