Wonky French Flag
This is an example ZX Spectrum program which produces a wonky French flag.
Usage
- Clone this git repository
- Change into the directory
- Run
code .
to bring up VSCode - Agree to "Reopen in container"
- Wait for the devcontainer to download and initialise
- Build the project with
make
- Open the
myprog.sna
file in your favourite Spectrum emulator - Recoil at flag wonkiness
- Open
main.asm
in the VSCode editor and have a quick read - Select "Run and Debug" from the bar on the far left
- In the drop down bar at the top, select "Simulator - ZX48K Spectrum"
- Press the "Start Debugging" green arrow to the left of the dropdown list
- Select the "Continue" arrow from the wee icon menu which has appeared at the top of the screen
- Recoil again at the wonky flag
- Stop debugging by pressing the square at the far right of the wee icon menu
- Go back to the
main.asm
file - Left click on the space to the left of the line number at line 25
- A little red breakpoint blob should have appeared. You can toggle this by clicking on it
- Start debugging again
- Press "Continue" arrow as before
- The debugger will stop the program running at the breakpoint
- Keep pressing the "Step into" downwards arrow on the wee icon bar
- Note what is happening to the registers on the left and the screen on the right
- Watch the red stripe getting painted
- Have a moment of revelation about how you're going to fix this
- Stop the debugger
- Edit
main.asm
to fix the bug - Remember to save the file and run
make
again to rebuild the program - Remove the breakpoint on line 25
- Run in the debugger again
- Marvel at the lovely flag
Description
Languages
Dockerfile
66.7%
Assembly
26%
Makefile
3.7%
Shell
3.6%