Article View: comp.sys.amiga.tech
Article #12338CHIP mem mystery code
From: Jim B Howard
Date: Mon, 24 Apr 1989 02:34
Date: Mon, 24 Apr 1989 02:34
81 lines
2124 bytes
2124 bytes
I have been having trouble with the following asm code that is
driving me NUTS. The code works perfectly, as long as it is
not in CHIP mem. If its in any form of FAST mem, it functions.
But if its in CHIP mem, it crashes and burns. I cant think of any
reason that this could happen, so maybe some of you could come
up with some reasons. I've never had this happen in any of my
programs before.. When I step through the program with a debugger,
it crashes when it calls the _LVOClearScreen routine, but
_only_ when its in CHIP mem.
WHY ???
***********************************************************************
start
jsr _getintbase
jsr _getgfxbase
jsr _openscreen
wait
btst #6,$bfe001
bne wait
rts
screendata:
dc.w 0,0 ;screen XY origin relative to View
dc.w 320,200 ;screen width and height
dc.w 2 ;screen depth (number of bitplanes)
dc.b 0,1 ;detail and block pens
dc.w 0 ;display modes for this screen
dc.w $f ;screen type
dc.l 0 ;pointer to default screen font
dc.l 0 ;screen title
dc.l 0 ;first in list of custom screen gadgets
dc.l 0 ;pointer to custom BitMap structure
_openscreen
lea screendata(pc),a0
move.l intbase,a6
jsr $ffffff3a(a6) ;openscreen
move.l d0,screen
add.l #$54,d0
move.l d0,screenrast
move.l screenrast,a1
move.l gfxbase,a6
jsr -$30(a6) ;clearscreen
rts
_getintbase
movea.l 4,a6
lea intname(pc),a1
moveq #0,d0
jsr -408(a6)
move.l d0,intbase
rts
_getgfxbase
movea.l 4,a6
lea gfxname(pc),a1
moveq #0,d0
jsr -408(a6)
move.l d0,gfxbase
rts
intbase
ds.l 1
intname
dc.b 'intuition.library',0
cnop 0,2
gfxbase
ds.l 1
gfxname
dc.b 'graphics.library',0
cnop 0,2
screen
dc.l 0
screenrast
dc.l 0
Technical Details
Message-ID:
<17545@cup.portal.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!xanth!lll-winken!uunet!portal!cup.portal.com!silverShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!xanth!lll-winken!uunet!portal!cup.portal.com!silver From: silver@cup.portal.com (Jim B Howard) Newsgroups: comp.sys.amiga.tech Subject: CHIP mem mystery code Message-ID: <17545@cup.portal.com> Date: 24 Apr 89 02:34:15 GMT Organization: The Portal System (TM) Lines: 81