3 ms·
in what sense is this "512 bytes"?...The source code appears to be about 4k The source .asm file is about 4k, most of which consists of comments. The rest is
by 300bps 7y ago
in what sense is this "512 bytes"?...The source code appears to be about 4k
The source .asm file is about 4k, most of which consists of comments.
The rest is assembly language code with things like:
mov ah,al
That assembly language which is 17 bytes including the preceding spaces gets assembled into machine language which is substantially lower. I'm much more familiar with 6510 assembly than I am 8086 assembly but I believe mov ah,al is one byte for the mnemonic and two bytes for the registers for a total of 3 bytes. So the actual machine code is far smaller than the assembly source code.
- a1369209993 7y ago> mov ah,al is One byte for [mov Gb Eb] and one byte for [modrm sp ax] (ah == (byte) r4 (word) == sp). x86 is pretty good about code density.
- acqq 7y ago> I believe mov ah,al is one byte for the mnemonic and two bytes for the registers for a total of 3 bytes. Two bytes in the 8086 mode: 88C4 mov ah,al And inside, ah and al are encoded with the 3 bits each, spending just 6 bits for "from which register to which register."