Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 100h
- EntryPoint:
- mov DX, 320 * 129 + 220
- mov AH, 0Fh
- int 10h
- mov [bOldMode], AL
- mov [bOldPage], BH
- ; Включение 13-го видеорежима [320x200, 256 цветов]
- mov AX, $0013
- int 10h
- ;
- push $A000
- pop ES
- StartDraw:
- ; Небо
- mov AL, 11
- xor DI, DI
- mov CX, 320 * 160
- rep stosb
- ; Вода
- mov AL, 1
- mov DI, 320 * 160
- mov CX, 320 * 40
- rep stosb
- ; Лодка
- mov AL, 114
- mov DI, DX
- mov CX, 120
- mov BX, 0
- .Boat:
- add DI, 201
- add DI, BX
- sub CX, 2
- push CX
- rep stosb
- pop CX
- add BX, 2
- cmp CX, 50
- ja .Boat
- ; Мачта
- mov AL, 17
- ; mov DI, 320 * 10 + 159
- mov DI, DX
- sub DI, 320 * 119 + 61
- .Machta:
- push DI
- mov CX, 3
- rep stosb
- pop DI
- add DI, 320
- cmp DI, 320 * 130
- jb .Machta
- ; Начало флага на мачте
- mov AL, 40
- mov CX, 25
- ; mov DI, 320 * 10 + 162
- mov DI, DX
- sub DI, 320 * 119 + 58
- .FlagUp:
- push DI
- dec CX
- push CX
- rep stosb
- pop CX
- pop DI
- add DI, 320
- cmp DI, 320 * 18
- jb .FlagUp
- .FlagDown:
- push DI
- inc CX
- push CX
- rep stosb
- pop CX
- pop DI
- add DI, 320
- cmp DI, 320 * 26
- jb .FlagDown
- ; Парус
- mov AL, 43
- mov CX, 1
- ; mov DI, 320 * 30 + 159
- mov DI, DX
- sub DI, 320 * 89 + 61
- .ParusUp:
- push DI
- add CX, 2
- push CX
- rep stosb
- pop CX
- pop DI
- add DI, 320
- push DI
- push CX
- rep stosb
- pop CX
- pop DI
- add DI, 320
- sub DI, 1
- cmp DI, 320 * 125
- jb .ParusUp
- ; Пристань
- mov Al, 19
- mov DI, 320 * 129 + 280
- Pristan:
- mov CX, 40
- rep stosb
- add DI, 280
- cmp DI, 320 * 160
- jb Pristan
- InputSymbol:
- mov AH, 08h
- int 21h
- cmp DX, 320 * 129 + 120
- je RightSh
- cmp AL, '0'
- je Finish
- LeftSh:
- cmp AL, '1'
- jne Resume
- sub DX, 2
- jmp StartDraw
- Resume:
- cmp DX, 320 * 129 + 280
- je InputSymbol
- RightSh:
- cmp AL, '2'
- jne InputSymbol
- add DX, 2
- jmp StartDraw
- Finish:
- ret
- bOldMode db ?
- bOldPage db ?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement