Path: news.weeg.uiowa.edu!news.uiowa.edu!hobbes.physics.uiowa.edu!zaphod.mps.ohio-state.edu!rpi!utcsri!newsflash.concordia.ca!clyde.concordia.ca!altitude!vandry From: vandry@CAM.ORG (Phillip Vandry) Newsgroups: comp.sys.apple2 Subject: Re: Whatever happened to... Message-ID: Date: 3 Feb 93 18:48:24 GMT References: <2B682A67.27035@news.service.uci.edu> <1993Jan29.150924.5687@aio.jsc.nasa.gov> <1993Feb2.124729.25426@actrix.gen.nz> Organization: Champlain Regional College, St-Lambert QC CANADA Lines: 43 David.Empson@bbs.actrix.gen.nz writes: >2. Are you changing HIMEM? If so, don't. If you need to protect part >of the computer's memory from BASIC's variables, try changing LOMEM >instead, and putting the data below that. If you really have to change >HIMEM, make sure you set it to a multiple of 256, and don't set it any >higher than it is already. >Also note that if you move HIMEM down and put any data above it, >BASIC.SYSTEM might move it in order to allocate a file buffer (not sure >about this). No, just don't altogether. Chances are BASIC.System will screw you up (or BASIC will get confused which is even worse) There is GETBUFR and FREBUFR if you need memory in the high area. Here: Allocate lda #numpages jsr $bef5 bcs error sta address+1 lda #0 sta address rts error oops Dealloc lda $befb pha lda address+1 clc adc #numpages sta $befb jsr $bef8 pla sta $befb rts Note that using this method you must deallocate buffers in the same order as they were allocated in. ______________________________________________________________________ |~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~| | Phillip Vandry | Vandry@Cam.Org | II the future! | II 1993! | |________________|________________|________________|___________________| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~