1 января 2019 к фанфику Диктатор
|
|
Пиши на Асемблере .... Hello, world! Говорят занимает немного...
mov ax, 0b800h mov ds, ax mov [02h], 'H' mov [04h], 'e' mov [06h], 'l' mov [08h], 'l' mov [0ah], 'o' mov [0ch], ',' mov [0eh], 'W' mov [10h], 'o' mov [12h], 'r' mov [14h], 'l' mov [16h], 'd' mov [18h], '!' ret Или так: .386 .model flat, stdcall option casemap:none include \masm32\include\windows.inc include \masm32\include\kernel32.inc includelib \masm32\lib\kernel32.lib .data msg db "Hello, world!", 13, 10 len equ $-msg .data? written dd ? .code start: push -11 call GetStdHandle push 0 push offset written push len push offset msg push eax call WriteFile push 0 call ExitProcess end start |