Path: utzoo!utgpu!attcan!uunet!husc6!bloom-beacon!mit-eddie!rutgers!ucsd!ucsdhub!jack!crash!pro-charlotte.cts.com!steelie From: steelie@pro-charlotte.cts.com (Jim Howard) Newsgroups: comp.sys.amiga Subject: Assembly Blues Message-ID: <3295@crash.cts.com> Date: 11 Aug 88 03:59:05 GMT Sender: news@crash.cts.com Lines: 105 Can anyone out there figure out what is wrong with the following excerpt of code? (besides the obvious sloppy style) It is *SUPPOSED* to calculate the sc_ViewPort value of the wbench screen, and then use SetRGB4 to change color register 0 to some other color. I assume this will make the background color change.. But so far, I have been able to get nothing but software errors as soon as I run it.. Doesnt change the color or anything.. I know this code doesnt close the screen or do any of the nicetys, but for all apparent(at least to me) reasons, it should at least FUNCTION... include "intuition/intuition.i" xref _LVOOpenLibrary xref _LVOSetRGB4 xref _LVOOpenScreen xref _LVOCloseScreen xdef sc_ViewPort xdef sc_RastPort NULL equ 0 ;for use in window structure movea.l 4,a6 ;directly load exec base lea intname,a1 ;get intuition.library jsr _LVOOpenLibrary(a6) ;open it move.l d0,intbase ;save pointer lea grpname,a1 ;get graphics.library jsr _LVOOpenLibrary(a6) ;open it move.l d0,grpbase ;save pointer lea screenvars,a0 move.l intbase,a6 jsr _LVOOpenScreen(a6) move.l d0,screen move.l screen,d0 add.l #sc_RastPort,d0 move.l d0,myraster sub.l #sc_RastPort,d0 add.l #sc_ViewPort,d0 move.l d0,myview move.l grpbase,a6 move.l myview,a0 move.l #0,d0 move.b #5,d1 move.b #0,d2 move.b #0,d3 jsr _LVOSetRGB4(a6) move.l intbase,a6 move.l screen,a0 jsr _LVOCloseScreen(a6) rts intname dc.b 'intuition.library',0 cnop 0,2 grpname dc.b 'graphics.library',0 cnop 0,2 intbase ds.l 0 grpbase ds.l 0 myview ds.l 0 screen ds.l 0 myraster ds.l 0 screenvars dc.w 0 * ns_LeftEdge dc.w 0 * ns_TopEdge dc.w 320 * ns_Width dc.w 200 * ns_Height dc.w 3 * ns_Depth dc.b 3 * ns_DetailPen dc.b 1 * ns_BlockPen dc.w 0 * ns_ViewModes dc.w WBENCHSCREEN * ns_Type dc.l 0 * ns_Font dc.l 0 * ns_DefaultTitle dc.l 0 * ns_Gadgets dc.l 0 * ns_CustomBitMap Also, has anyone noticed that when using Blink, if any of the XREF's are more than about 15 characters long, then the *@#$% thing wont recognize it??? Really annoying when you try something like XREF _LVOViewPortAddress the thing only looks at recognizes it as _LVOViewPortAdd , and then cant find that in amiga.lib ! Respond via e-mail, as I dont want to waste any more space than I already have with this. Thanks, UUCP: ....!crash!pro-charlotte!steelie | Pro-Charlotte - (704) 567-0029 ARPA: crash!pro-charlotte!steelie@nosc.mil| 300/1200/2400 baud 24 hrs/day INET: steelie@pro-charlotte.cts.com | Log in as "register"