Frame 2 writes every byte of the screen in order: nought, one, two, all the way to 255, and round again. Nothing in that loop says where a colour goes. The colours are simply laid down the memory one after another — and what comes out is diagonal.
That slant is the proof of the whole lesson. A row is 320 bytes wide and there are only 256 colours, so every row begins 64 colours further along than the row above it. The picture leans because 320 does not divide by 256. If the screen were really a grid of rows, it could not.
offset = y * 320 + x
That is the same line lesson 1 wrote in C, and it is still the only arithmetic in the file. The screen is not a grid. It is one long row of 64000 bytes, and it only looks like a grid because the card reads 320 of them, drops a line, and reads 320 more.
mov di, 100*320 + 60 ; across
mov cx, 200
rep stosb ; ...and that is the whole line
mov di, 40*320 + 160 ; down
mov cx, 120
.down: mov byte [es:di], 14
add di, 320 ; the pixel below is 320 bytes further on
loop .down
Same line on the glass, completely different price. Across, the pixels are neighbours in memory and one instruction draws all two hundred; down, they are 320 bytes apart and it has to be a loop. That difference is why everything in these games is drawn in horizontal spans — the terrain, the aircraft, the cockpit. It is not a style, it is what the memory layout charges you.
The assembler is in the tab with you, which is the point of this page rather than a video of it. The dot in frame 1 is colour 15, white:
EDIT PIXEL.ASM MAKE RUN
Try 4. Try 40. Try moving it. Reload the page and everything is back as it was, so there is nothing you can break.
the lesson's source and notes · lesson 2 · back to the arcade · the assembler is flat assembler, and the DOS is DOSBox compiled to WebAssembly via js-dos