Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!timbuk!cs.umn.edu!kksys!orbit!pnet51!koleman From: koleman@pnet51.orb.mn.org (Kurt Koller) Newsgroups: comp.sys.amiga.tech Subject: Assembly confusion Message-ID: <3735@orbit.cts.com> Date: 2 Jan 91 12:45:03 GMT Sender: root@orbit.cts.com Organization: People-Net [pnet51], Minneapolis, MN. Lines: 82 Well, guys, I have two questions... First of all, I am just learning the "intuition" side of assembly programming. I have a program that moves a palette to a custom screen. The part in question looks like this: movea.l #KolePalette,a2 ;beginning of palette palloop movea.l (GraphicsPtr),a6 ;*graphics.library in a6 movea.l (KSViewPort),a0 ;*viewport in a0 move.b (a2),d0 cmp.b #$ff,d0 ;If $ff then end-of-palette beq endpal move.b (a2)+,d0 move.b (a2)+,d1 ;Move colors move.b (a2)+,d2 move.b (a2)+,d3 jsr (_LVOSetRGB4,a6) bra palloop endpal *********** * Palette * ************************ * COL R G B * ************************ KolePalette dc.b $00,$0b,$09,$07 ;Color 0 dc.b $01,$00,$00,$00 ;Color 1 dc.b $02,$0e,$0e,$0e ;Color 2 dc.b $03,$00,$09,$0d ;Color 3 dc.b $04,$0e,$0e,$00 ;Color 4 dc.b $05,$0e,$00,$00 ;Color 5 dc.b $06,$0f,$0f,$0f ;Color 6 dc.b $07,$0e,$0e,$0e ;Color 7 dc.b $08,$0c,$0c,$0c ;Color 8 dc.b $09,$0b,$0b,$0b ;Color 9 dc.b $0a,$0a,$0a,$0a ;Color 10 dc.b $0b,$09,$09,$09 ;Color 11 dc.b $0c,$08,$08,$08 ;Color 12 dc.b $0d,$06,$06,$06 ;Color 13 dc.b $0e,$05,$05,$05 ;Color 14 dc.b $0f,$04,$04,$04 ;Color 15 dc.b $ff ;End of Table even Now, the problem is after the palette is there. All of the colors move. Sometimes the background color remains that of my workbench. Sometimes it is right, but when I move the screen it changes to the workbench background. It's always JUST the background. This is driving me nuts. I hope it's something really stupid. And for the second question... I have this: movea.l (KWPtr),a0 ;Pointer to window's user movea.l (wd_UserPort,a0),a0 ; port goes in a0 move.b (MP_SIGBIT,a0),d1 ;window's signal bits moveq.l #1,d0 ;Convert bit number in mask lsl.l d1,d0 ; and place result in d0 SYSCALL Wait ;Wait for closegadget And I'm waiting for a MENUPICK. This is the only thing I am waiting for, not a closegadget. It used to be a closegadget. Anyhow, what do I do next? All of the RKM examples on this are in C, and I am having a difficult time with this one. CAn someone maybe mail me an example of how to figure out what menuitem was chosen, etc? MAybe mail me an example (in assembly, please)... Thanks, any help is appreciateed, etc... Koleman Kurt "Koleman" Koller UUCP: {crash tcnet}!orbit!pnet51!koleman INET: koleman@pnet51.orb.mn.org