Amiga.org

Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: THEWASP on February 06, 2004, 07:52:12 PM

Title: nudos.library
Post by: THEWASP on February 06, 2004, 07:52:12 PM
What does the nudos.library do and where can I get it? My WB 2.1 doesnt have it. I noticed my telnetd.device has a call for nudos.library in it and I wonder if this isnt some of my problems.



THEWASP
Title: Re: nudos.library
Post by: Piru 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]
Title: Re: nudos.library
Post by: Kronos on February 06, 2004, 08:58:36 PM
Quote

Piru wrote:

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



/me feels sick ... :shocked:  :nervous:  :crazy:
Title: Re: nudos.library
Post by: THEWASP on February 06, 2004, 09:01:19 PM
OK thanks for the info. I dont seem to have dos.library in my system.


THEWASP
Title: Re: nudos.library
Post by: Piru 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).
Title: Re: nudos.library
Post by: THEWASP on February 06, 2004, 09:35:06 PM
Ahh I see! HEHE!   Thanks for the info.


THEWASP
Title: Re: nudos.library
Post by: Karlos on February 06, 2004, 10:05:45 PM
Quote

Piru wrote:

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!


Dude, thats very grim ;-) I'd write some sort of self extracting compressed code before resorting to this :-D