home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!psgrain!qiclab!leonard
- From: leonard@qiclab.scn.rain.com (Leonard Erickson)
- Newsgroups: comp.lang.pascal
- Subject: Re: Turbo Pascal mem[a:b] question
- Message-ID: <1992Nov16.050457.26839@qiclab.scn.rain.com>
- Date: 16 Nov 92 05:04:57 GMT
- Article-I.D.: qiclab.1992Nov16.050457.26839
- References: <zlsiida.414@fs1.mcc.ac.uk>
- Reply-To: Leonard.Erickson@f51.n105.z1.fidonet.org
- Organization: SCN Research/Qic Laboratories of Tigard, Oregon.
- Lines: 28
-
- zlsiida@fs1.mcc.ac.uk (dave budd) writes:
-
- >One of our users claims he can increase a in mem[a:b]:=value; until it MUST
- >be off the end of his machine. This is the kind of user who always forgets
- >to bring a disk with the program on it. I've had a brief scan of the manual
- >and it's not clear to me just exactly which bits of memory get addressed -
- >eg I don't believe they'd let you write into a program segment.
- >Are all the addresses relative to the start of the data segment (or
- >something along those lines)?
- >If the address is off the end of the machine or just bigger than the largest
- >allowable, does it get truncated in some way?
- >Anybody want to give me a nice simple explanation of how mem[a:b] works?
-
- Sure. A is the segment, B is the offset. These are *absolute* addresses,
- not relative to anything.
-
- You can specify *any* address. If it's not present in the machine what
- happens is probably hardware/BIOS dependent.
-
- mem[a:b] := x is a *very* low level instruction. It's compiled as a
- direct write to RAM. probably a LOAD X,[a:b] (if I remember the assembler
- mnemonics correctly).
-
- --
- Leonard Erickson leonard@qiclab.scn.rain.com
- CIS: [70465,203] 70465.203@compuserve.com
- FIDO: 1:105/51 Leonard.Erickson@f51.n105.z1.fidonet.org
- (The CIS & Fido addresses are preferred)
-