2024-04-21 02:28:43 +02:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; ;;
|
|
|
|
;; Copyright (C) KolibriOS team 2004-2024. All rights reserved. ;;
|
|
|
|
;; Distributed under terms of the GNU General Public License ;;
|
|
|
|
;; ;;
|
|
|
|
;; GNU GENERAL PUBLIC LICENSE ;;
|
|
|
|
;; Version 2, June 1991 ;;
|
|
|
|
;; ;;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
2024-04-21 23:05:47 +02:00
|
|
|
macro PDEBUGF _level*, _fmt*, _bus*, _devfn*, [_args] {
|
2024-04-29 03:02:04 +02:00
|
|
|
common
|
|
|
|
if __DEBUG__
|
|
|
|
sub esp, 12
|
|
|
|
push ebx
|
|
|
|
movzx ebx, _bus
|
|
|
|
mov dword [esp + 4], ebx
|
|
|
|
movzx ebx, _devfn
|
|
|
|
shr ebx, 3 ; get rid of 3 lowest bits (function code), the rest bits is device code
|
|
|
|
mov dword [esp + 8], ebx
|
|
|
|
movzx ebx, _devfn
|
|
|
|
and ebx, 00000111b ; get only 3 lowest bits (function code)
|
|
|
|
mov dword [esp + 12], ebx
|
|
|
|
pop ebx
|
|
|
|
DEBUGF _level, _fmt, [esp], [esp + 4], [esp + 8], _args
|
|
|
|
add esp, 12
|
|
|
|
end if
|
2024-04-21 02:28:43 +02:00
|
|
|
}
|