Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1817 | Albom | 1 | |
2 | macro strlen string |
||
3 | { |
||
4 | local .bcl,.ebcl |
||
5 | mov esi,string |
||
6 | mov ecx,0 |
||
7 | .bcl: |
||
8 | cmp byte [esi+ecx],0 |
||
9 | je .ebcl |
||
10 | inc ecx |
||
11 | jmp .bcl |
||
12 | .ebcl: |
||
13 | |||
14 | |||
15 | |||
16 | |||
17 | |||
18 | PrintString dd _PrintString |
||
19 | WaitForKeyPress dd _WaitForKeyPress |
||
20 | SetCursorPos dd _SetCursorPos |
||
21 | TextColor dd _TextColor |
||
22 | GetUserInput dd _GetUserInput |
||
23 | UpperCase dd _UpperCase |
||
24 | PrintChar dd _PrintChar |
||
25 | PrintCharCursor dd _PrintCharCursor |
||
26 | |||
27 | |||
28 | |||
29 | call [con_cls] |
||
30 | ret |
||
31 | |||
32 | |||
33 | pusha |
||
34 | push esi |
||
35 | call [con_write_asciiz] |
||
36 | popa |
||
37 | ret |
||
38 | |||
39 | |||
40 | pusha |
||
41 | call [con_getch] |
||
42 | popa |
||
43 | ret |
||
44 | |||
45 | |||
46 | pusha |
||
47 | mov ebx, eax |
||
48 | and ebx, 0xff |
||
49 | mov ecx, eax |
||
50 | and ecx, 0xff00 |
||
51 | shr ecx, 8 |
||
52 | push ecx |
||
53 | push ebx |
||
54 | call [con_set_cursor_pos] |
||
55 | popa |
||
56 | ret |
||
57 | |||
58 | |||
59 | ret |
||
60 | |||
61 | |||
62 | pusha |
||
63 | push new_line |
||
64 | call [con_write_asciiz] |
||
65 | push 256 |
||
66 | push buffer |
||
67 | call [con_gets] |
||
68 | popa |
||
69 | mov edi, buffer |
||
70 | strlen edi |
||
71 | ret |
||
72 | |||
73 | |||
74 | pushad |
||
75 | push es |
||
76 | ; mov ax,sys_data ; <- лишняя деталь :) |
||
77 | ; mov es,ax |
||
78 | UcaseNextChar: |
||
79 | mov al,byte[es:edi] |
||
80 | cmp al,0 |
||
81 | je UcaseDone |
||
82 | cmp al,0x61 |
||
83 | jb DontUcaseChar |
||
84 | cmp al,0x7a |
||
85 | ja DontUcaseChar |
||
86 | sub al,0x20 |
||
87 | mov byte[es:edi],al |
||
88 | DontUcaseChar: |
||
89 | inc edi |
||
90 | jmp UcaseNextChar |
||
91 | UcaseDone: |
||
92 | pop es |
||
93 | popad |
||
94 | ret |
||
95 | |||
96 | |||
97 | pusha |
||
98 | and eax, 0xff |
||
99 | push eax |
||
100 | push char_spec |
||
101 | call [con_printf] |
||
102 | add esp, 8 |
||
103 | popa |
||
104 | ret |
||
105 | |||
106 | |||
107 | pusha |
||
108 | and eax, 0xff |
||
109 | push eax |
||
110 | push char_spec |
||
111 | call [con_printf] |
||
112 | add esp, 8 |
||
113 | popa |
||
114 | ret |
||
115 | |||
116 | |||
117 | |||
118 | |||
119 |