Git Product home page Git Product logo

memsize's Introduction

memsize

Small pascal program to find and size memory on 286-based IBM compatible machines that the BIOS does not see.

Background

Some time ago, I aquired an old Everex RAM 8000 memory expansion card for the ISA16 bus. It was fully equipped with DRAM, the system - a Commodore PC 10-III with 1 MiB of onboard DRAM - did not find it. I cound not find any software for this card, documentation is also very rare. I tried some configurations and other computers and came to the conclusion, that it might be configured not to beginn at address 0x00100000 (1 Meg) but at 0x00400000. To test my assumption, I wrote that short program to test and find memory that the computers BIOS did not find - it stops at the first 64 KiB block it cannot write to (you may have a look at the original IBM BIOS' source code which is available on the web - I bet the code did not change a lot over decades...)

Installation

Take your favourite 80286 based computer and load the executable on a floppy disk. It should wirk with almost all flavours of DOS, however I tested it with M$ DOS v5 only lately.

Usage example

Parameters are as follows:

 MEMSIZE [options]

 Optinos:
   /NoA20    : Do not change A20
   /DisA20   : Switch A20 off instead of on
   /16M      : Test all 16MiB, not above 1MiB
   /Dump     : Print LOADALL parameters
   /Halt     : Halt system after execution
   /?, /Help : Show this little info

When executing in a PCem emulated Ami 286 system, it might look like this: PCem Screenshot

Development setup

FreePascal 3.0

Note: up to now, the program can be compiled, but not executed.

Take a look on the FreePascal Wiki to learn how to install a MS-DOS crosscompiler for FreePascal. It works pretty well, however it generates only 8086 code. This does not hurt, except for the 80286 specific stuff (like the Mashine Status Word for example, or "SHL reg, imm8" for logical shifts). Those instructions have been framed in FPC-specific IFDEFs. To compile MEMSIZE, you may use something like this:

ppcross8086 -WmTiny -Wtcom MEMSIZE.PAS

Turbo Pascal 7

You need to have (or find) a functioning copy of Borland's Turbo Pascal, e.g. version 7. This can be done e.g. in DOSbox. Copy all 4 .PAS-Files, and compile "CPU286.PAS" first. After that, you can compile "MEMSIZE.PAS".

Localization

All language-specific strings (I hope) are stored in separate source files. You may choose your favourite translation by changing the respective define in "MEMSIZE.PAS":

{Localization:}
{$I MSLANGDE.PAS}

Currently, "MSLANGDE.PAS" and "MSLANGEN.PAS" for German and English are available.

Release History

  • 0.2.0
    • FIX: should not work on all IBM286 compatibles now
    • CHANGE: FreePascal can now be used to compile the sources for DOS, the program itself however does not work by now
  • 0.1.0
    • changed to real-mode and LOADALL, using TP7
  • 0.0.1
    • 1st version using protected mode exceptions, quit buggy and non portable

Foreign code

Parts of this software (as noted in the sources) is based in Rober R. Collin's exccelent LOADALL code for the 80286 processor, see his page about the LOADALL-instruction for details.

Meta

Alexander J. L. Hofmann โ€“ https://www.nerdlingen.de โ€“ [email protected]

Distributed under the GNU GPLv3 license. See LICENSE for more information.

https://github.com/21347/memsize

memsize's People

Contributors

21347 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.