Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Latest version of native ppc assembler for G4 Macintosh

15 views
Skip to first unread message

Tinkerer Atlarge

unread,
Dec 14, 2010, 6:37:17 AM12/14/10
to
"dis.of" the Open Firmware assembler/disassembler package continues to
evolve. More options have been added including:

- now has own namespace to avoid cluttering user dictionary

- BI and BO fields now decoded for simpler branch instructions

- forth names in label+offset format now available as branch targets

- mtspr and mfspr now recognize register names as well as numbers

'asm' makes it easy to try out individual ppc instructions at the Open
Firmware prompt.

eg extlwi "Extract & left-justify n bits, starting bit b":

( boot hd:3,\dis.of )
code trythat
asm extlwi r20,r20,8,16 \ r20 = top item forth parameter stack
c;

56789abc trythat . ( response -> 9a000000 )


code trythis
asm lwz r21,0(r31) \ r21 = spare reg, (r31) -> 2nd-on-stack
asm addi r31,r31,4 \ adj r31 stack ptr (nip 2nd fm stack)
asm inslwi r20,r21,16,8 \ insert lhs 16 bits of r21 at r20[8]
c;

12345678 cccccccc trythis . ( response -> cc1234cc )

Alternatively, '<address> azm' may be used to patch previously installed
code.

"dis.of" has been donated to the public domain but has grown too large
to post on usenet. 160K as of 14-Dec-2010.

Copies of this latest version are available from tinkerer at the above
email address.

0 new messages