https://github.com/barrettotte/bootjack
A bootable Blackjack written in 508 bytes
https://github.com/barrettotte/bootjack
blackjack boot-sector boot-sector-game
Last synced: about 1 month ago
JSON representation
A bootable Blackjack written in 508 bytes
- Host: GitHub
- URL: https://github.com/barrettotte/bootjack
- Owner: barrettotte
- License: mit
- Created: 2021-11-27T19:10:34.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-12T00:34:35.000Z (almost 4 years ago)
- Last Synced: 2025-07-11T10:37:34.692Z (3 months ago)
- Topics: blackjack, boot-sector, boot-sector-game
- Language: Assembly
- Homepage:
- Size: 45.9 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bootjack
A bootable Blackjack written in 508 bytes.

## Limitations
This is a minimal blackjack so its single deck and missing bets, splits, etc.
I ran out of space to print scores per round, but blackjack isn't hard to calculate.
I also ran out of space for good prompts, so when its the player's turn:
`h=hit`, `q=quit`, and any other char is considered a stand.The same type of logic exists for when the game is over. `q=quit` and any other
char is considered to be "play again".## Running Locally
Build and run via QEMU with - `make qemu`
I also made a little C prototype in [c/](c/) that can be
run with - `gcc c/blackjack.c -Wall -o blackjack; ./blackjack`.## References
- [Programming Boot Sector Games - Toledo Gutierrez](https://www.amazon.com/Programming-Sector-Games-Toledo-Gutierrez/dp/0359816312)
- [x86 instructions](https://www.felixcloutier.com/x86/)
- [Linear congruential generator](https://en.wikipedia.org/wiki/Linear_congruential_generator)
- [Interrupt table for BIOS/DOS](https://stanislavs.org/helppc/int_table.html)
- [PC Interrupts: A Programmer's Reference to BIOS, DOS, and Third Party Calls - Ralf Brown](https://www.amazon.com/PC-Interrupts-Programmers-Reference-Third-dp-0201577976/dp/0201577976)
- [Code page 437](https://en.wikipedia.org/wiki/Code_page_437)