f



Latest version of native ppc assembler for G4 Macintosh

"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
tinkerer (32)
12/14/2010 11:37:17 AM
comp.sys.mac.hardware.misc 4192 articles. 1 followers. Post Follow

0 Replies
434 Views

Similar Articles

[PageSpeed] 12

Reply: