China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-29 10:05
中国DOS联盟论坛 » 论坛回收站 » Please clarify the specific content of "P processing" you mentioned. Could you provide more context or details about what kind of "P processing" it is? View 1,735 Replies 11
Original Poster Posted 2010-04-30 13:49 ·  中国 湖南 长沙 电信
初级用户
★★
Credits 81
Posts 80
Joined 2009-08-30 06:32
16-year member
UID 151201
Gender Male
Status Offline
I have a file where each line is in this format.
0000: 0xA0090590 ; 0: void loopback0()
Convert all to:
0000: 00000000 900509A0 ; 0: void loopback0()

If a line is in this format.
If there is a semicolon comment at the beginning, do not process it.
;wxyz: 0xA0DDEEFF ; x: void func()
Floor 2 Posted 2010-04-30 15:09 ·  中国 吉林 延边朝鲜族自治州 延吉市 电信
银牌会员
★★★
正在学习中的菜鸟...
Credits 1,039
Posts 897
Joined 2009-03-01 15:34
17-year member
UID 140302
Gender Male
From 在地狱中仰望天堂
Status Offline
The LZ should post several more lines and explain which parts are fixed and which parts are variable.
Floor 3 Posted 2010-04-30 16:05 ·  中国 湖南 长沙 移动
初级用户
★★
Credits 81
Posts 80
Joined 2009-08-30 06:32
16-year member
UID 151201
Gender Male
Status Offline
0000: 00000000 F50A96A0   ;   0: void loopback0()
0004: 00000000 F50A96A0 ; 1: void loopback1()
......
;0D4: ; 35: AlarmClockRing
0B78: 00000000 F50A96A0 ; 2DE: __thumb void IllumTimeRequest(int TimeMode, int Counter);

[ Last edited by loquat on 2010-4-30 at 16:11 ]
Floor 4 Posted 2010-04-30 17:08 ·  中国 北京 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
Originally posted by Hanyeguxing at 2010-4-30 15:09:
The poster should post more lines and explain which part is fixed and which part is changing.


- -Requires uploading sample text.

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 5 Posted 2010-04-30 17:13 ·  中国 陕西 咸阳 电信
初级用户
★★
Credits 81
Posts 80
Joined 2009-08-30 06:32
16-year member
UID 151201
Gender Male
Status Offline
Upload after eating.
This is the file...

The requirement is to add 00000000 to the middle part, and then invert every two digits...

[ Last edited by loquat on 2010-4-30 at 18:50 ]
Floor 6 Posted 2010-04-30 17:58 ·  中国 湖北 黄石 电信
中级用户
★★
Credits 330
Posts 244
Joined 2006-04-14 14:07
20-year member
UID 53823
Gender Male
From 湖北
Status Offline
Originally posted by loquat at 2010-4-30 13:49:
I have a file where each line is in the following format.
0000: 0xA0090590 ; 0: void loopback0()
Need to change all to:
0000: 00000000 900509A0 ; 0: void loopback0()

If there is ...




1010 0000 0000 1001 0000 0101 1001 0000
1001 0000 0000 0101 0000 1001 1010 0000


Inverse every two bits ;) The building owner still uses VBS, js, or C......
P handles bit operations, (check bit operations in set /?), which is not simple...
Floor 7 Posted 2010-04-30 18:51 ·  中国 湖南 长沙 电信
初级用户
★★
Credits 81
Posts 80
Joined 2009-08-30 06:32
16-year member
UID 151201
Gender Male
Status Offline
VBS can also be used. Who will help write one? I don't want to do this P processing, but use this file to import into IDA to learn things...
Floor 8 Posted 2010-04-30 19:10 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
He said that two-digit bitwise NOT operation turns the address format ABCD into DCBA (where A, B, C, D are all two digits).

0000: 0xA0090590
0000: 00000000 900509A0
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
Floor 9 Posted 2010-04-30 19:32 ·  中国 湖南 长沙 电信
初级用户
★★
Credits 81
Posts 80
Joined 2009-08-30 06:32
16-year member
UID 151201
Gender Male
Status Offline
My double - bit inversion should be ABCD <-> CDAB
Floor 10 Posted 2010-04-30 19:48 ·  中国 北京 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
- -Hey
fr -ric:"(ab)(cd)" -t:"\2\1"
This can achieve the swap.

fr -ric:"(ab)(cd)" -t:"000000 \2\1"
Add zeros at the front

[ Last edited by yishanju on 2010-4-30 at 19:54 ]

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 11 Posted 2010-04-30 19:52 ·  中国 吉林 延边朝鲜族自治州 延吉市 电信
银牌会员
★★★
正在学习中的菜鸟...
Credits 1,039
Posts 897
Joined 2009-03-01 15:34
17-year member
UID 140302
Gender Male
From 在地狱中仰望天堂
Status Offline
```@echo off&setlocal enabledelayedexpansion
(for /F "eol=# delims=" %%a in (a.txt) do set a=%%a&if "!a:~0,1!"==";" (echo.%%a) else for /F "tokens=1,2* delims=:;" %%b in ("%%a") do set c=%%c&echo.%%b: 00000000 !c:~9^,2!!c:~7^,2!!c:~5^,2!!c:~3^,2! ;%%d)>b.txt```
Floor 12 Posted 2010-04-30 20:23 ·  中国 湖北 黄石 电信
中级用户
★★
Credits 330
Posts 244
Joined 2006-04-14 14:07
20-year member
UID 53823
Gender Male
From 湖北
Status Offline
Forgot to pad with leading zeros, add ;)

sed -e "/^/s/0x\(..\)\(..\)\(..\)\(..\)/00000000 0x\3\4\1\2/" testfile.txt


[ Last edited by freeants001 on 2010-4-30 at 20:35 ]
Forum Jump: