kolibrios/programs/other/archer/trunk/dump.inc
Evgeny Grechnikov (Diamond) 16091ddd9e File system: new function 70.3 for write to the existing file
@panel: to match K0581 distro: SYSMETER -> GMON
@numcalc: moved to the appropriate place in repository
HeEd: added english variant
NetSendC, NetSendS: added english variant + optimization
pic4: changes in set background + optimization
tetris, @rcher, board, sysxtree, vrr: new versions from K0581 distro
bgitest: fixed small error + ability to set language via lang.inc
c4: small correction in label height to match K0581 distro

git-svn-id: svn://kolibrios.org@131 a494cfbc-eb01-0410-851d-a64ba20cac60
2006-08-18 13:32:18 +00:00

56 lines
1001 B
PHP

; Include file for dumping user apps' memory through new debug BOARD
; Max amount of bytes to be dumped
IPC_BUF equ 160
; Dump macro parameters:
; ptr - pointer to memory dumped
; len - dump length
; workarea - any work area for sysfunc 9
; run_new - if not empty, run BOARD unless it is running already
macro Dump ptr, len, workarea,run_new
{
local .exist,.lt
pusha
mov ebx,workarea
call Board_seek
if ~ run_new eq
test edx,edx
jne .exist
mcall 19,Board_seek.board_fn,0
mov edx,eax
mcall 5,20
end if
.exist:
mov esi,len
cmp esi,IPC_BUF
jbe .lt
mov esi,IPC_BUF
.lt:
mcall 60,2,edx,ptr
popa
}
if used Board_seek
Board_seek:
; ebx - prcinfo
xor edx,edx
mcall 9,,-1
mov ecx,eax
mov esi,dword[.board_fn]
.lp:
mcall 9
cmp dword[ebx+10],esi
; jne .no
; cmp dword[ebx+42],399
je .ok
.no:
loop .lp
ret
.ok:
mov edx,[ebx+30]
ret
.board_fn db 'BOARD '
end if