Rev 430 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 430 | Rev 444 | ||
---|---|---|---|
Line -... | Line 1... | ||
- | 1 | $Revision: 431 $ |
|
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
- | 3 | ;; ;; |
|
- | 4 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
|
- | 5 | ;; Distributed under terms of the GNU General Public License ;; |
|
2 | ;; ;; |
6 | ;; ;; |
3 | ;; KERNEL32.INC ;; |
7 | ;; KERNEL32.INC ;; |
4 | ;; ;; |
8 | ;; ;; |
5 | ;; Included 32 bit kernel files for MenuetOS ;; |
9 | ;; Included 32 bit kernel files for MenuetOS ;; |
6 | ;; ;; |
10 | ;; ;; |
7 | ;; This file is kept separate as it will be easier to ;; |
11 | ;; This file is kept separate as it will be easier to ;; |
8 | ;; maintain and compile with an automated SETUP program ;; |
12 | ;; maintain and compile with an automated SETUP program ;; |
9 | ;; in the future. ;; |
13 | ;; in the future. ;; |
10 | ;; ;; |
14 | ;; ;; |
11 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
12 | - | ||
13 | ; structure definition helper |
- | |
14 | macro struct name, [arg] |
- | |
15 | { |
- | |
16 | common |
- | |
17 | name@struct equ name |
- | |
18 | struc name arg { |
- | |
19 | } |
- | |
20 | - | ||
21 | macro struct_helper name |
- | |
22 | { |
- | |
23 | match xname,name |
- | |
24 | \{ |
- | |
25 | virtual at 0 |
- | |
26 | xname xname |
- | |
27 | sizeof.#xname = $ - xname |
- | |
28 | name equ sizeof.#xname |
- | |
29 | end virtual |
- | |
30 | \} |
- | |
31 | } |
- | |
32 | - | ||
33 | ends fix } struct_helper name@struct |
- | |
34 | - | ||
35 | ;// mike.dld, 2006-29-01 [ |
- | |
36 | - | ||
37 | ; macros definition |
- | |
38 | macro diff16 title,l1,l2 |
- | |
39 | { |
- | |
40 | local s,d |
- | |
41 | s = l2-l1 |
- | |
42 | display title,': 0x' |
- | |
43 | repeat 8 |
- | |
44 | d = 48 + s shr ((8-%) shl 2) and $0F |
- | |
45 | if d > 57 |
- | |
46 | d = d + 65-57-1 |
- | |
47 | end if |
- | |
48 | display d |
- | |
49 | end repeat |
- | |
50 | display 13,10 |
- | |
51 | } |
- | |
52 | - | ||
53 | ; \begin{diamond}[29.09.2006] |
- | |
54 | ; may be useful for kernel debugging |
- | |
55 | ; example 1: |
- | |
56 | ; dbgstr 'Hello, World!' |
- | |
57 | ; example 2: |
- | |
58 | ; dbgstr 'Hello, World!', save_flags |
- | |
59 | macro dbgstr string*, f |
- | |
60 | { |
- | |
61 | local a |
- | |
62 | iglobal_nested |
- | |
63 | a db 'K : ',string,13,10,0 |
- | |
64 | endg_nested |
- | |
65 | if ~ f eq |
- | |
66 | pushfd |
- | |
67 | end if |
- | |
68 | push esi |
- | |
69 | mov esi, a |
- | |
70 | call sys_msg_board_str |
- | |
71 | pop esi |
- | |
72 | if ~ f eq |
- | |
73 | popfd |
- | |
74 | end if |
- | |
75 | } |
- | |
76 | ; \end{diamond}[29.09.2006] |
- | |
Line 77... | Line 16... | ||
77 | 16 | ||
78 | ;struc db [a] { common . db a |
17 | ;struc db [a] { common . db a |
79 | ; if ~used . |
18 | ; if ~used . |
80 | ; display 'not used db: ',`.,13,10 |
19 | ; display 'not used db: ',`.,13,10 |