flat assembler
Message board for the users of flat assembler.
Index
> DOS > Three games - 24 bytes each (May Be The Smallest PC Games) |
Author |
|
sourcerer 04 Oct 2011, 16:08
It's joke. Only two of them are 24 byte-sized. Third is 27 bytes.
I wrote a topic about this games (on russian!): http://habrahabr.ru/blogs/asm/119765/ you can play them if you want. You need DOS or Dosbox of NTVDM, but for third game you should use 8086 First: First gamer press any key on keyboard. Second gamer press keys on keyboar until he press first pressed key. Otherwise he'll get a hint Code: org 100h ;;Guess what key was pressed int 16h ;;Wait for keyboard press mov bl, al ;;Save keycode still: ;;Main loop int 29h ;;Print entered symbol mov ax, 1*256+13;;al=13 - carriage return, ah=1 - check keyboard int 29h int 21h cmp al, bl ;;compare keycodes mov al, '+' ja still mov al, '-' jb still true: ret Second: There are 19 sticks on the table. Press number key to take few. You MUST press 1, 2 or 3. Otherwise your PC opponent will be mad 'coz you broke the rules So, you and your PC takes sticks from the table until somebody takes last stick Code: org 100h ;;Famous Bashe game mov dl, 15+4 ;;dl=number of sticks still: ;;Main loop sub dl, 4 js fin mov ax, 1*100h+'|' ;;Out stick sumbol mov cl, dl ;;in loop disp: ;;from 1 to cl stick int 29h ;;callin 29h loop disp int 21h sub al, '0' ;;Convert ASCII to real number cmp dl, al ;;If you take last stick you won jne still win: int 29h ;;Print heart symbol fin: ret Third: Try to get three same symbols pressing "right arrow". It's VERY difficult, but few people can do this. You need very slow PC or emulator to play this game. Code: ;;Roulette (one-handed bandit) org 100h push 0b800H ;;Working with videomemory pop ds le: ;;out symbol inc bx inc bx ;;move cursor inf: ;;Almost infinite loop int 1AH ;;Call timer add dl, bl ;;Avoid player to win with fast "right arrow" pressing mov [bx], dl ;;Out symbol to the screen ;;Keyboard handle in al, 60H cmp al, 77 ;;Pressed "right arrow", go to next symbol jnz inf ;;Almost infinite loop loops almost infinite re: ;;It's time to print next symbol or stop roulette cmp bx, 6 jnz le ret ;;Fin |
|||
04 Oct 2011, 16:08 |
|
sourcerer 05 Oct 2011, 12:03
Ow I didn't knew that.
|
|||
05 Oct 2011, 12:03 |
|
addes3 05 Oct 2011, 23:50
Obviously wasn't tested on a 8086
|
|||
05 Oct 2011, 23:50 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.