This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Windows.h> | |
| #include <mmsystem.h> | |
| #pragma comment(lib,"Winmm.lib") | |
| int main(int argc, char ** argv) | |
| { | |
| PlaySoundA(argv[1], NULL, SND_SYNC); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Процедура принимает в R0 число-маску с единицами слева, | |
| ; до которых будет обрезан вывод | |
| ; Например #7 - 111 - будет выдавать числа от 0 до 7 | |
| ; #377 - 11111111 - будет выдавать числа от 0 до 255 | |
| ; Возвращает в R0 число в заданном диапазоне | |
| ; Схема генерации: | |
| ; x ^= x << 7; | |
| ; x ^= x >> 9; | |
| ; x ^= x << 8; | |
| GENRNDVALUE: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .LINK 1000 | |
| EMT 14 ; Чистим экран | |
| MOV #55000,R3 ; Позиции линий | |
| MOV #45000,R4 | |
| ; Запрещаем прерывания от клавиатуры, чтобы не мешало игре | |
| MOV #100,@#177660 |