home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
debugo.zip
/
ENABLE.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-04-21
|
2KB
|
89 lines
/* */
if "Debugo" <> address() then do
say 'Execute from Debugo.'
exit 0
end
push "ln"
i = 0
do while queued() > 0
i = i + 1
select
when i = 2 then nearestsymbol = getline()
otherwise junk = getline()
end
end
nPos = pos( "OS2_PM_DRV_ENABLE", nearestsymbol )
if nPos = 0 then do
say 'Expected ENABLE to be nearest symbol'
exit 0
end
n = length( nearestsymbol ) - nPos
if pos( '+', right( nearestsymbol, n )) > 0 then do
/* get value of ebp */
push "? ebp"
i = 0
do while queued() > 0
i = i + 1
select
when i = 2 then EBP = word( getline(), 1 )
otherwise junk = getline()
end
end
szAddress = EBP'+8'
end
else do
/* get value of esp */
push "? esp"
i = 0
do while queued() > 0
i = i + 1
select
when i = 2 then ESP = word( getline(), 1 )
otherwise junk = getline()
end
end
szAddress = ESP'+4'
end
push 'dd ss:'szAddress 'L3'
i = 0
do while queued() > 0
i = i + 1
select
when i=2 then sz1 = getline()
otherwise junk = getline()
end
end
subfunc = x2d( word( sz1, 2 ))
select
when subfunc = 1 then szfunc = 'FILL_LOGICAL '
when subfunc = 2 then szfunc = 'FILL_PHYSICAL '
when subfunc = 4 then szfunc = 'DISABLE_PHYSICAL '
when subfunc = 5 then szfunc = 'ENABLE_DC '
when subfunc = 6 then szfunc = 'DISABLE_DC '
when subfunc = 7 then szfunc = 'SAVE_DC '
when subfunc = 8 then szfunc = 'RESTORE_DC '
when subfunc = 9 then szfunc = 'RESET_DC '
when subfunc =10 then szfunc = 'COMPLETE_OPEN_DC '
when subfunc =11 then szfunc = 'BEGIN_CLOSE_DC '
otherwise szfunc = 'weirdness'
end
say 'Subfunc=' subfunc szfunc
say 'parm 1 =' word( sz1, 3 )
say 'parm 2 =' word( sz1, 4 )
exit 0