home .. forth .. colorforth mail list archive ..

[colorforth] Reverse engineering the BIOS


Hoi folks,

I have generalised the labels into a labelstruct (class).
For three type of situations there are now such structs:
named labels, multiple line comment before an address,
comment at the end of a line.
Instances of labelstruct are automatically registered, such that
SORT-ALL sorts them all.

In the attachment you can see:
- plain disassembly
- reverse engineering information
- adorned assembly

The information is a mess, typical for notes jotted down.
But they are sorted (out) nicely.

Next is the ability to assemble and disassemble data.
At that point it must be up to some practical work, like
removing the longstanding bug in FreeCell.

The BIOS is more difficult, some thinking must go into
the interplay of 16 and 32 bits code.

Greetings Albert.


Albert van der Horst,Oranjestr 8,3511 RA UTRECHT,THE NETHERLANDS
        One man-hour to invent,
                One man-week to implement,
                        One lawyer-year to patent.
albert@xxxxxxxxxxxxxxxxxx http://home.hccnet.nl/a.w.m.van.der.horst
-----------------------------------------

1278  ORG

( 1278 )                  CLD,
( 1279 )                  MOV,   X|   T|   DI'|   MEM|   1294 X,
( 1285 )                  POP|ES,
( 1286 )                  ADD,   B|   F|   AL'|   D0|   [SI]
( 1288 )                  MOV,   X|   T|   DI'|   MEM|   1294 X,
( 1294 )                  MOV,   X|   T|   DI'|   MEM|   1285 X,
( 1300 )                  JMP,   -11 (RX,)
( 1305 )                  JMP,   -16 (RX,)
( 1310 )                  JMP,   -22 (RX,)
( 1315 )                  JMPS,   -23 (RB,)
( 1317 )                  JMPS,   -26 (RB,)
( 1319 )                  JMP,   13 (RX,)
( 1324 )                  JMP,   7 (RX,)
( 1329 )                  JMPS,   6 (RB,)
( 1331 )                  JMPS,   3 (RB,)
( 1333 )                  LEA,   AX'|   DB|      [AX   +4*   AX]   0 B,
( 1337 )

-----------------------------------------
\ 1278 ORG
\ In files ciforth multiple line strings are allowed.

"

\ #################### ""WELCOME"" he said ####################

\ Here it all starts
\ Fasten Your Seat Belts (tm)"  1278 COMMENT

1285  LABEL QQQ
"XXX is a target for backward jumps:" 1294 COMMENT
1294  LABEL XXX
1294  COMMENT:   Move a xell to register DI from memory at QQQ
"YYY is a target for forward jumps:" 1337 COMMENT
1337  LABEL YYY

\ Oeps, forgot this one ... Shows that labels need not supplied in order.
1278 COMMENT: First instruction
-----------------------------------------
1278  ORG

\

\ #################### "WELCOME" he said ####################

\ Here it all starts
\ Fasten Your Seat Belts (tm)
( 1278 )                  CLD,   \ First instruction
( 1279 )                  MOV,   X|   T|   DI'|   MEM|   XXX   X,
( 1285 )   :QQQ      POP|ES,
( 1286 )                  ADD,   B|   F|   AL'|   D0|   [SI]
( 1288 )                  MOV,   X|   T|   DI'|   MEM|   XXX   X,
\ XXX is a target for backward jumps:
( 1294 )   :XXX      MOV,   X|   T|   DI'|   MEM|   QQQ   X,   \   Move a xell to register DI from memory at QQQ
( 1300 )                  JMP,   XXX   RX,
( 1305 )                  JMP,   XXX   RX,
( 1310 )                  JMP,   -22 (RX,)
( 1315 )                  JMPS,   XXX   RB,
( 1317 )                  JMPS,   -26 (RB,)
( 1319 )                  JMP,   YYY   RX,
( 1324 )                  JMP,   7 (RX,)
( 1329 )                  JMPS,   YYY   RB,
( 1331 )                  JMPS,   3 (RB,)
( 1333 )                  LEA,   AX'|   DB|      [AX   +4*   AX]   0 B,
\ YYY is a target for forward jumps:
( 1337 )   :YYY
-----------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com