kolibrios/programs/develop/examples/example/trunk/rus/example.asm

156 lines
5.2 KiB
NASM
Raw Normal View History

; <20><><EFBFBD><EFBFBD><20><EFBFBD><E0A8AC> <20>ணࠬ<E0AEA3><E0A0AC> <20><><EFBFBD> KolibriOS
; <20><><EFBFBD><EFBFBD><EFBFBD><E7A8A2><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD> FASM'<27><>
; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> example.asm <20><><20>ணࠬ<E0AEA3><E0A0AC> FASM (<28><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
; <20><><><20><EFBFBD>)
; <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> F9 <20> Tinypad'<27>. <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
; <20>⮡ࠦ<E2AEA1><E0A0A6><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><20><EFBFBD><E2ABA0><EFBFBD> (<28>ணࠬ<E0AEA3><E0A0AC> BOARD)
;
; <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC><EFBFBD><E0AEA2><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
; <20><><EFBFBD><EFBFBD><EFBFBD> <20>㭪樨 <20><><EFBFBD><EFBFBD><EFBFBD><E9A0A5><EFBFBD> <20><><E0A5A3><EFBFBD><EFBFBD> eax.
; <20><EFBFBD> <20><><EFBFBD><EFBFBD><E2A5AC><EFBFBD> <20>㭪樨 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E2A2AB><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "int 0x40".
; <20><><EFBFBD><><E0A5A3><EFBFBD><EFBFBD><EFBFBD>, <20><EFBFBD><><><E3AAA0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E9A0A5><EFBFBD> <20><><EFBFBD><EFBFBD><E7A5AD>,
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E0A5A3><EFBFBD><EFBFBD><><E4ABA0><EFBFBD> eflags, <20><><EFBFBD><EFBFBD><E0A0AD><EFBFBD><EFBFBD><EFBFBD>.
;
; <20><EFBFBD><E0A8AC>:
; mov eax, 1 ;<3B><EFBFBD><E3ADAA><EFBFBD> 1 - <20><><EFBFBD><EFBFBD><E2A0A2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>
; ;ᯨ᮪ <20><><EFBFBD><EFBFBD>㭪権 <20><>. <20> DOCPACK - sysfuncr.txt
; mov ebx, 10 ; <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> x=10
; mov ecx, 20 ; <20><><EFBFBD><EFBFBD><E0A4A8><EFBFBD><EFBFBD> y=10
; mov edx, 0xFFFfff ;梥<> <20><>
; int 0x40 ;<3B><EFBFBD><EBA7A2><EFBFBD> <20><EFBFBD><E3ADAA><EFBFBD>
;
; <20><><EFBFBD><EFBFBD><><E1A0AC> <20> <20><EFBFBD><EFBFBD><ECA7AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
; mcall 1, 10, 20, 0xFFFfff
;---------------------------------------------------------------------
use32 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 32-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <><E0A5A6> <20><><EFBFBD><E1A5AC><EFBFBD><EFBFBD><EFBFBD>
org 0x0 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>
db 'MENUET01' ; 8-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E4A8AA><EFBFBD><EFBFBD> MenuetOS
dd 0x01 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><EFBFBD><E1A5A3> 1)
dd START ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
dd I_END ; ࠧ<><E0A0A7><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>
dd 0x1000 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
dd 0x1000 ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
dd 0x0 ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><E0A0AC>
dd 0x0 ; <20><><EFBFBD>ࢨ஢<E0A2A8><E0AEA2><EFBFBD>
include "macros.inc" ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E1A5AC><EFBFBD><EFBFBD><EFBFBD><E9A8AA>!
;---------------------------------------------------------------------
;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ----------------------------------------------
;---------------------------------------------------------------------
START:
red: ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1AEA2><EFBFBD> <20><><EFBFBD><EFBFBD>
call draw_window ; <20><><EFBFBD><EFBFBD><EBA2A0> <20><><EFBFBD><EFBFBD><E6A5A4><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E1AEA2> <20><><EFBFBD><EFBFBD>
;---------------------------------------------------------------------
;--- <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ----------------------------------------
;---------------------------------------------------------------------
still:
mcall 10 ; <20><EFBFBD><E3ADAA><EFBFBD> 10 - <20><><EFBFBD><EFBFBD><EFBFBD><><E1AEA1><EFBFBD><EFBFBD>
cmp eax,1 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1AEA2><EFBFBD> <20><><EFBFBD><EFBFBD> ?
je red ; <20><20><> - <20><> <20><><EFBFBD><EFBFBD><EFBFBD> red
cmp eax,2 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ?
je key ; <20><20><> - <20><> key
cmp eax,3 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ?
je button ; <20><20><> - <20><> button
jmp still ; <20><20><><EFBFBD><>⨥ - <20> <20><><EFBFBD><><E6A8AA>
;---------------------------------------------------------------------
key: ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mcall 2 ; <20><EFBFBD><E3ADAA><EFBFBD> 2 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><><E1A8AC><EFBFBD><EFBFBD> (<28> ah)
mov [Music+1], ah ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><><E1A8AC><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>
; <20><EFBFBD><E3ADAA><EFBFBD> 55-55: <20><><EFBFBD><EFBFBD><E2A5AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ("PlayNote")
; esi - <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
; mov eax,55
; mov ebx,eax
; mov esi,Music
; int 0x40
; <20><><EFBFBD> <20><><EFBFBD><EFBFBD>⪮:
mcall 55, eax, , , Music
jmp still ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><><E6A8AA>
;---------------------------------------------------------------------
button:
mcall 17 ; 17 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E4A8AA><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cmp ah, 1 ; <20><20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>஬ 1,
jne still ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.exit:
mcall -1 ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>
;---------------------------------------------------------------------
;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ----------------------------------
;---------------------------------------------------------------------
draw_window:
mcall 12, 1 ; <20><EFBFBD><E3ADAA><EFBFBD> 12: ᮮ<><E1AEAE><EFBFBD><EFBFBD><EFBFBD> <20><> <20> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E1AEA2>
mcall 48, 3, sc,sizeof.system_colors
; <20><><EFBFBD><EFBFBD><EFBFBD>: ᭠砫<E1ADA0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A8A0> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD>)
; <20><><20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><EFBFBD><EFBFBD><ECA7AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
; mov eax,0 ; <20><EFBFBD><E3ADAA><EFBFBD> 0: <20><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
; mov ebx,200*65536+300 ; [x <20><><EFBFBD><EFBFBD><EFBFBD>] *65536 + [x ࠧ<><E0A0A7><EFBFBD>]
; mov ecx,200*65536+150 ; [y <20><><EFBFBD><EFBFBD><EFBFBD>] *65536 + [y ࠧ<><E0A0A7><EFBFBD>]
; mov edx, [sc.work] ; 梥<><>
; or edx, 0x33000000 ; <20> <20><><EFBFBD><EFBFBD> 3
; mov edi,header ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
; int 0x40
mov edx, [sc.work] ; 梥<><>
or edx, 0x33000000 ; <20> <20><><EFBFBD><EFBFBD> 3
mcall 0, <200,300>, <200,150>, , ,title
; <20><EFBFBD><><EFBFBD><E2AEA2> <20><><EFBFBD>
mov ecx, [sc.work_text] ; 梥<><>
or ecx, 0x90000000 ; <20> <20><><EFBFBD>
mcall 4, <10, 20>, 0x90000000, message
mcall 12, 2 ; <20><EFBFBD><E3ADAA><EFBFBD> 12.2, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD>
ret ; <20><><EFBFBD><E5AEA4> <20><> <20><><EFBFBD><EFBFBD><E6A5A4><EFBFBD>
;---------------------------------------------------------------------
;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ----------------------------------------------
;---------------------------------------------------------------------
; <20><><EFBFBD><><E2A0AA> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>".
; <20><><EFBFBD><20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Music:
db 0x90, 0x30, 0
sc system_colors
message db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...',0
title db '<27><EFBFBD><E0A8AC> <20>ணࠬ<E0AEA3><E0A0AC>',0
;---------------------------------------------------------------------
I_END: ; <20><><20><><EFBFBD><EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>