Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [memory-layout]

For questions regarding the layout or mapping of memory in a retrocomputer.

Filter by
Sorted by
Tagged with
62 votes
3 answers
17k views

Who set the 640K limit?

We all know that "640K should be enough for everyone". But who actually set this limit? The quote is often attributed to Bill Gates, but it doesn't seem like a decision for an Operating System vendor ...
PkP's user avatar
  • 959
55 votes
8 answers
11k views

Why didn't the 8086 use linear addressing?

The 8086 used a segmented memory architecture where the linear address was computed from a 16-bit segment number and a 16-bit offset. This greatly complicated things from a programming perspective. ...
Alex Hajnal's user avatar
  • 9,350
32 votes
1 answer
3k views

Did DOS zero out the BSS area when it loaded a program?

As an example, say we have a DOS MZ EXE file that's around 20 KiB in size. The EXE header contains the value 0x1400 at offset 0x0A indicating that the program is requesting 5,120 paragraphs (or 80 KiB)...
smitelli's user avatar
  • 1,769
32 votes
6 answers
4k views

Why is the Amiga ROM at a high memory location, and RAM in low memory?

When a 68000 CPU powers up, it reads a few words at memory location zero to get the initial stack pointer and program counter. That suggests to me that a computer system designer would put the system ...
Richard Downer's user avatar
29 votes
3 answers
7k views

Why did Intel abandon unified CPU cache?

When Intel introduced the 80486 in 1989, they included their first on-chip cache, ostensibly to compete better with Motorola, who had been including on-chip caches for 5 years (MC68020, 1984). Unlike ...
Brian H's user avatar
  • 60.8k
29 votes
2 answers
4k views

How did an IBM 5150 with 16KB RAM work?

I keep reading that when it was first released, there was a variant of the IBM PC model 5150 that had only 16KB of RAM installed. From a hardware perspective, this would clearly work - the 5150 ...
Jules's user avatar
  • 13k
26 votes
8 answers
13k views

Did any computer use a 7-bit byte?

In an answer to Why did IBM System 360 have byte addressable RAM I wrote regarding the choice of byte size: 7 bits would be a perfect match for ASCII, but engineers would instinctively recoil from ...
rwallace's user avatar
  • 61.3k
23 votes
3 answers
4k views

What were the actual memory model definitions in MS-DOS?

I've heard the phrase "memory model" used in relation to MS-DOS programming (and early Windows), with terms such as "small" and "compact". But what were the actual ...
paxdiablo's user avatar
  • 4,832
22 votes
5 answers
4k views

How did old computers address far more than 64K of memory despite only having a 16 bit address bus?

I have an old Sharp PC-G830 pocket computer from the '80s that has 32K of RAM and 256K of ROM. I also have a simple single board computer I built with 128K of RAM and a few megabytes of ROM from a ...
Shades's user avatar
  • 331
22 votes
4 answers
3k views

Was it possible to cause persistent changes to a mid-1980s IBM-PC using POKE in GWBASIC?

TL;DR: Using the DEF SEG and POKE commands in GWBASIC, was there any way to make changes to an IBM-PC compatible computer that would (a) persist even after a reboot and (b) cause an increase in crash ...
Schmuddi's user avatar
  • 925
22 votes
1 answer
3k views

How is memory allocated in Super Mario World?

Super Mario World (SMW) is known to have several bugs relating to re-use of memory for multiple purposes. For example some memory items are used for more than one type of item, and the designers are ...
user's user avatar
  • 15.2k
21 votes
5 answers
3k views

Was 1991's Hellcats the first instance of incremental screen updates?

In case you have never seen it, 1991's Hellcats was a seminal release on the Mac. It ran at full 8-bit color and could, on a newish machine, drive three 1024x768 screens at the same time. Nothing on ...
Maury Markowitz's user avatar
20 votes
2 answers
3k views

How to check the C64 graphics mode used by Maniac Mansion

I have been investigating the MS-DOS port of the C64's Maniac Mansion game. The original MS-DOS port used the C64-specific character map to draw the various backgrounds in the game. I noticed that ...
user avatar
19 votes
3 answers
5k views

What is the purpose of mirrored memory regions in NES's CPU memory map? [duplicate]

[Please see answers to this related question as well] I've started reading the "official" NES Documentation and in page ten, it says that "memory locations $0000-$07FF are mirrored ...
anmomu92's user avatar
  • 193
19 votes
4 answers
3k views

Why did the TI-99/4 have two databuses?

Wikipedia says on Russian page: Однако к 16-разрядной шине были подключены только 256 байт статической памяти и системное ПЗУ. Остальная память (ОЗУ) и периферийные устройства были 8-разрядными и ...
Omar and Lorraine's user avatar
19 votes
6 answers
5k views

Where is DOS stored in memory when a program starts?

When the execution of a COM program begins, DOS jumps to address 100h. But at what address is DOS stored in RAM while the COM program is executing? Is DOS stored in conventional memory? If so, isn't ...
Flux's user avatar
  • 531
18 votes
3 answers
6k views

Did anyone ever put half a megabyte of memory in an Altair?

The Altair 8800 typically, at least in the early years after its release in 1975, operated with no more than a few kilobytes of memory, for the excellent and sufficient reasons that memory was ...
rwallace's user avatar
  • 61.3k
16 votes
2 answers
4k views

How was a line of Commodore 64 BASIC code stored in its memory?

I am reading up on old C64 stuff and I am using the Vice emulator to play with it. Currently I am studying about how the C64 stored BASIC programs in RAM. This is quite clear (it starts on address $...
Bart Friederichs's user avatar
16 votes
1 answer
942 views

How did the Sideways address space work?

I was researching the BBC Micro when I found the Sideways address space: a 16KiB memory space allowing access to up to 16 16KiB external blocks of ROM (or RAM). But 16 blocks of 16KiB is 256KiB, ...
wizzwizz4's user avatar
  • 18.6k
16 votes
1 answer
2k views

What are the "ports" used via IN/OUT, vs. the PEEK/POKE address space?

This is something of a followup to How much control of TRS-80 Model III disk drives was possible from its Cassette (ROM) BASIC? but on a more general topic: I know that PEEK and POKE enable direct ...
natevw's user avatar
  • 2,947
16 votes
2 answers
1k views

What is this code on the zero page that was put there by the BASIC ROM?

(question copied from SO (from the days before RC.SE existed): http://stackoverflow.com/q/31877835/477476) Zero-page memory maps of the PET that I've found claim that the zero page address range$00C2....
Cactus's user avatar
  • 2,708
16 votes
2 answers
1k views

How much of the Program Segment Prefix area can be reused by programs with impunity?

I am writing a tiny TSR program, and I want it to take as little memory while installed as possible. The memory footprint of every loaded DOS process, including a TSR, includes a data structure known ...
user3840170's user avatar
  • 23.1k
15 votes
4 answers
3k views

Can DOS make use of more than 640 KB of conventional memory on 80186?

Can I have more than 640 KB conventional RAM under some DOS? I'm looking at an 80186 PC that has RAM at address A0000. Video RAM starts at B0000 as expected for a Hercules; A0000 is just more main ...
Joshua's user avatar
  • 1,839
15 votes
2 answers
3k views

How does the Commodore 64 address more than 64 kilobytes of memory?

So, the Commodore 64 has two special registers in locations $00 and $01. By writing to these registers, you can somehow turn on and off the ROMs and other things. The thing that I am not understanding ...
Omar and Lorraine's user avatar
15 votes
1 answer
974 views

What did POKE 842,13 on Atari do? (Jamming the Return key)

In quite a few programs on Atari, I found the self-programming trick: 10 GRAPHICS 0 : REM clear the screen, enter standard text mode 20 POSITION 2,4 : REM place cursor 4 lines from ...
SF.'s user avatar
  • 7,105
15 votes
1 answer
4k views

What is this unused memory range in the Game Boy's memory map?

Here is a basic memory map of the Game Boy's 16bit address bus: 0000-3FFF 16KB ROM Bank 00 (in cartridge, fixed at bank 00) 4000-7FFF 16KB ROM Bank 01..NN (in cartridge, switchable bank number) 8000-...
JAL's user avatar
  • 9,520
14 votes
3 answers
3k views

Why does PC video memory base address change depending on video mode?

It is rather well-known that, with VGA-compatible PC video adapters, in black-and-white text modes video memory is available at linear address 0xB0000, in colour text mode at address 0xB8000, while in ...
user3840170's user avatar
  • 23.1k
14 votes
5 answers
4k views

Mapping more than 64kb of address space

I'm planning out a 6502 homebrew build but seem to be stuck in the issue of buying parts. My plan is to extend the addressing capabilities of the 6502 by giving myself 64kb of RAM, and another 64kb of ...
user avatar
14 votes
1 answer
2k views

What manages Upper Memory Blocks (UMBs) in MS-DOS?

I had always assumed that EMM386.EXE was responsible for managing the Upper Memory Blocks - UMBs - the memory space between 640KiB and 1MiB in real mode x86. For example, on MS-DOS 6.22, help emm386....
Richard Downer's user avatar
13 votes
1 answer
1k views

What problem does LOADFIX solve?

From MS-DOS help for the LOADFIX command: Some programs will display the "Packed file corrupt" message when all or a portion of the program has been loaded in the first 64K of conventional ...
user10191234's user avatar
  • 1,945
12 votes
2 answers
2k views

Is all 100% of a 64k Apple II memory usable?

Are there any areas of the 64k RAM which are permanently unusable by anything, whether by the built-in monitor ROM or user programs? Looking at $C000-C0FF, this is the "softswitch" area, and as far ...
Dale Mahalko's user avatar
  • 3,649
12 votes
1 answer
1k views

Why did the Amstrad CPC use a nonlinear screen memory layout?

The screen memory layout on the Commodore 64 in bitmap mode was nonlinear - which incurred a penalty in development time, code size and speed for games using it - because when designing the VIC-II, ...
rwallace's user avatar
  • 61.3k
12 votes
2 answers
859 views

Why did Amstrad choose such bank combinations for its all-RAM mode in +2A and +3 Spectrum computers?

The +2A and the +3 versions of the ZX Spectrum, made by Amstrad, had a new banking mode, called "special". This banking mode is entered by setting bit 0 of port 1FFD. When active, two bits from this ...
mcleod_ideafix's user avatar
12 votes
1 answer
2k views

Why are some soft switches on the Apple II only triggered with a write?

The Apple II uses memory mapped I/O and soft switches to do many things. One thing has confused me though: why are some soft switches only activated when written to? For example, 80COLON ($C00D) and ...
bjb's user avatar
  • 16.3k
11 votes
3 answers
2k views

How can I access/use memory outside of the standard 1 MB address range of MS-DOS?

How do you access more memory (above the 1MB) in DOS if the 640KB of conventional memory are not enough? I have read a lot about this, but I couldn't figure out how to do this in actual code. Is ...
DarkAtom's user avatar
  • 2,337
11 votes
3 answers
2k views

Why are the PPU registers on the NES mirrored?

[Please see answers to this related question as well] The NES Picture Processing Unit has eight memory-mapped registers to the CPU in registers $2000 to $2007. The are incompletely decoded, so they ...
JAL's user avatar
  • 9,520
11 votes
2 answers
1k views

How does JSR actually work on the 65c816 CPU for the SNES (Super Nintendo)?

Take the following machine code for the 65c816 for the SNES (Super Nintendo): 00000000 ea ea 78 18 fb c2 18 a2 ff 1f 9a 20 fa 80 e2 20 |..x........ ... | 00000010 a9 80 8d 00 21 a9 e0 8d 22 21 ...
AlphaCentauri's user avatar
11 votes
1 answer
581 views

How to write Win16 program with only a single segment (combined code+data)?

I wrote a simple Win16 program in NASM assembly. It works on Windows 3.11. (Source code: https://github.com/pts/mininasm/blob/master/demo/hello/helljw16.nasm .) When I tried to combine the code and ...
pts's user avatar
  • 2,013
10 votes
3 answers
5k views

Disable memory refresh on Z80

Is there a software method of disabling memory refresh on the Z80? Or would it be acceptable to create a hardware method of disabling the address bus during the refresh cycle? If I switch off the ...
Jasmine's user avatar
  • 203
10 votes
2 answers
2k views

How to use all memory on an IBM PC with 8086

I'm developing software for the IBM PC with an 8086 processor. I want my program to use all available memory. I know that I can use DOS int 21h function AH=48h to allocate all available conventional ...
pts's user avatar
  • 2,013
10 votes
2 answers
618 views

Why did the COMX-35 video memory seem unreliable?

In my early days, many many years ago, one of the machines I managed to get my hands on was the COMX-35, a funky little machine based on the 1802 CPU. I remember trying to develop some games for it ...
paxdiablo's user avatar
  • 4,832
10 votes
3 answers
2k views

Why VGA framebuffer was limited to 64kB window?

VGA framebuffer was fixed to 64kB at A0000h. Right after that there’s MDA/CGA framebuffer at B0000h. I am not sure, but I recall VGA did have to support CGA and its framebuffer, but was there any ...
tuomas's user avatar
  • 2,793
10 votes
1 answer
972 views

Commodore Plus/4 60671 bytes free - how?

It is widely known that, while the Commodore 64 did indeed provide 64K of RAM for machine code programs, only 38K was usable from BASIC; this was because bank switching was needed to get at the rest, ...
rwallace's user avatar
  • 61.3k
10 votes
2 answers
1k views

Can the Nintendo 64 run code directly from ROM?

I've read that the usual way to execute code on the N64 is to use DMA to copy it from ROM into RAM, and then run from RAM. However, it seems that the contents of the ROM are directly visible to the ...
RetroSpark's user avatar
10 votes
2 answers
1k views

Why is the Interrupt Enable Hardware Register in the HRAM area on the Gameboy?

It's something I've always been wondering: Almost all of the hardware registers on the Gameboy are placed between $ff00 and $ff7f (with plenty of gaps and empty space), the HRAM is located between $...
secondperson's user avatar
10 votes
1 answer
1k views

Amiga 500+ rev8A, 1 MB chip RAM and 0.5 MB slow RAM

I have an 500+ rev8A, I added the missing 0.5 MB RAM and the U32 to the motherboard. I also have 512 KB in the trapdoor. This results in 1.5 MB chip RAM; but I want to have 1 MB chip RAM and 0.5 MB ...
lasertank's user avatar
  • 101
9 votes
10 answers
1k views

Were there any games/software that used memory beyond what was advertised available to BASIC on the machine?

Were there any games/software that used memory beyond what was advertised as available to BASIC on the machine ? On home / personal computers any time up to 1984 . Without needing to plug in any ...
questiontype's user avatar
  • 1,061
9 votes
5 answers
3k views

C64 cartridge emulation with ATmega

As a personal project I had the idea to create a custom cartridge for my Commodore 64 and use an ATmega 1284p microcontroller to emulate eproms and/or custom chips. Basically my idea is similar to ...
MastErAldo's user avatar
9 votes
2 answers
3k views

Why did the BIOS load the MBR at 0x7c00?

The IVT is at 0x0000-0x03ff while the BDA is at 0x0400-0x04ff but boot sectors are loaded at 0x7c00. What was at 0x0500-0x7bff that caused this convention? I'm also curious why some MBRs relocate ...
Anthony's user avatar
  • 455
9 votes
1 answer
2k views

How does Notepad store text files in memory?

Before I knew about line endings, I used to open small executables in Notepad and ruin them completely. However, some more complex executables (e.g. Paint Shop) were too big for Notepad, and I was ...
wizzwizz4's user avatar
  • 18.6k