home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / pascal / 6615 < prev    next >
Encoding:
Internet Message Format  |  1992-11-15  |  1.7 KB

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