Welcome, Guest. Please login or register.

Author Topic: nudos.library  (Read 2301 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: nudos.library
« on: February 06, 2004, 08:18:15 PM »
There is no Nudos.library. It opens dos.library. "Nu" is part of the subroutine before the string (RTS, Return from Subroutine, see M68000PM/AD 4-169).

'Nu' is ascii presentation of 'rts' instruction (0x4e75).

213A1A98 4E75                   rts

213A1A98: 4E75646F 732E6C69 62726172 79000000  'Nudos.library...'

213A1A98: Nudos.library...


Strings like this are easily generated when strings are merged in the code section (usually strings used by the function are grouped after the function itself, or to end of the hunk).

[EDIT]
Some flashback from my asm coding days:

Indeed, if the library name begins with 'u' you can overlay with 'RTS' instruction. This was esp useful for utility.library:

;...
rts
UtilityName EQU *-1
dc.b 'tility.library',0

This way the library name begins in the middle of the 'rts' instruction... :-) And you possibly save another 4 bytes in executable size. Yay!
[/EDIT]
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: nudos.library
« Reply #1 on: February 06, 2004, 09:11:14 PM »
Quote
I dont seem to have dos.library in my system.

You do, every Amiga has it (it's in ROM).