/kernel/trunk/macros.inc |
---|
File deleted |
Property changes: |
Deleted: svn:keywords |
-Rev |
\ No newline at end of property |
/kernel/trunk/boot/bootcode.inc |
---|
156,20 → 156,6 |
popa |
ret |
uint2str_16: |
cmp ax,cx |
jb @f |
xor dx,dx |
div cx |
push dx |
call uint2str_16 |
pop ax |
@@: cmp al,10 |
sbb al,$69 |
das |
stosb |
ret |
; Now int 16 is used for keyboard support. |
; This is shorter, simpler and more reliable. |
if 0 |
546,6 → 532,7 |
mov [si + 7], al |
_setcursor 0, 3 |
call printplain |
_setcursor d80x25_top_num,0 |
; ------------------ |
mov ax, 0x5304 ; Disconnect interface |
574,26 → 561,6 |
apm_end: |
; ----------------------------------------- |
; --------------- REVISION ---------------- |
push ds |
pop es |
mov di,svn_num_buf - 0x10000 |
mov ax,__REV__ |
mov cx,10 |
call uint2str_16 |
mov ax,' ' |
stosw |
sub di,svn_num_buf - 0x10000 |
mov dx,80 - 1 - msg_svn.len |
sub dx,di |
call setcursor |
mov si,msg_svn - 0x10000 |
call printplain |
mov si,svn_num_buf - 0x10000 |
call printplain |
_setcursor d80x25_top_num,0 |
; ----------------------------------------- |
; DISPLAY VESA INFORMATION |
push 0 |
1331,4 → 1298,3 |
gmok2: |
push ds |
pop es |
/kernel/trunk/kernel.asm |
---|
10,11 → 10,15 |
;; Compile with last version FASM |
;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
include 'macros.inc' |
_REV_ = 0 |
macro $Revision a { |
match =: Num =$,a \{ |
if _REV_ < Num |
_REV_ = Num |
end if |
\} |
} |
$Revision$ |
include "proc32.inc" |
include "kglobals.inc" |
include "lang.inc" |
5108,7 → 5112,4 |
IncludeUGlobals |
uglobals_size = $ - endofcode |
diff16 "end of kernel code",0,$ |
__REV__ = __REV |
diff10 "revision",0,__REV__ |
diff10 "revision",0,_REV_ |
/kernel/trunk/kernel16.inc |
---|
16,10 → 16,6 |
;% +include |
msg_svn db " SVN ",0 |
msg_svn.len = $ - msg_svn |
svn_num_buf rb 12 |
;!!! |
if lang eq en |
include "boot/booteng.inc" ; english system boot messages |
33,7 → 29,7 |
end if |
if lang eq et |
include "boot/et.inc" ; Estonian font |
else if lang eq ru |
else |
include "boot/ru.inc" ; Russian font |
end if |
/kernel/trunk/kernel32.inc |
---|
11,6 → 11,91 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
; structure definition helper |
macro struct name, [arg] |
{ |
common |
name@struct equ name |
struc name arg { |
} |
macro struct_helper name |
{ |
match xname,name |
\{ |
virtual at 0 |
xname xname |
sizeof.#xname = $ - xname |
name equ sizeof.#xname |
end virtual |
\} |
} |
ends fix } struct_helper name@struct |
;// mike.dld, 2006-29-01 [ |
; macros definition |
macro diff16 title,l1,l2 |
{ |
local s,d |
s = l2-l1 |
display title,': 0x' |
repeat 8 |
d = 48 + s shr ((8-%) shl 2) and $0F |
if d > 57 |
d = d + 65-57-1 |
end if |
display d |
end repeat |
display 13,10 |
} |
macro diff10 title,l1,l2 |
{ |
local s,d,z,m |
s = l2-l1 |
z = 0 |
m = 1000000000 |
display title,': ' |
repeat 10 |
d = '0' + s / m |
s = s - (s/m)*m |
m = m / 10 |
if d <> '0' |
z = 1 |
end if |
if z <> 0 |
display d |
end if |
end repeat |
display 13,10 |
} |
; \begin{diamond}[29.09.2006] |
; may be useful for kernel debugging |
; example 1: |
; dbgstr 'Hello, World!' |
; example 2: |
; dbgstr 'Hello, World!', save_flags |
macro dbgstr string*, f |
{ |
local a |
iglobal_nested |
a db 'K : ',string,13,10,0 |
endg_nested |
if ~ f eq |
pushfd |
end if |
push esi |
mov esi, a |
call sys_msg_board_str |
pop esi |
if ~ f eq |
popfd |
end if |
} |
; \end{diamond}[29.09.2006] |
;struc db [a] { common . db a |
; if ~used . |
; display 'not used db: ',`.,13,10 |