English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 13 November 2023, 18:30   #1
fstarred
Registered User
 
fstarred's Avatar
 
Join Date: Mar 2018
Location: Rome
Posts: 173
AutoRequest reference, where am I wrong?

According to reference, Autorequest routine is so composed:

Code:
Response = AutoRequest( Window, BodyText, PosText, NegText,
	D0                      A0      A1        A2       A3
			PosFlags, NegFlags, Width, Height )
			D0        D1        D2     D3
By taking a look to IntuiText struct, it is so composed:

Code:
struct IntuiText
{
    UBYTE FrontPen, BackPen;	/* the pen numbers for the rendering */
    UBYTE DrawMode;		/* the mode for rendering the text */
    WORD LeftEdge;		/* relative start location for the text */
    WORD TopEdge;		/* relative start location for the text */
    struct TextAttr *ITextFont;	/* if NULL, you accept the default */
    UBYTE *IText;		/* pointer to null-terminated text */
    struct IntuiText *NextText; /* pointer to another IntuiText to render */
};
So I expect to see LeftEdge value as the 4th byte of the struct;
I then debugged the AutoRequest call on some games, and here's an example of BodyText:

Code:
0001CFB0 0000 0000 0003 0003 0000 0000 0001 CF94 
0001CFC0 0001 CF80 [...]
As you can see, the Left Edge starts at 5th byte.
I read many manuals and all give that info about IntuiText.

What's the matter?
fstarred is offline  
Old 13 November 2023, 18:43   #2
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,002
A WORD must be at an even address. Because of this the C compiler adds an additional pad byte between DrawMode and LeftEdge so that LeftEdge starts at offset 4.
thomas is offline  
Old 13 November 2023, 18:49   #3
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,114
FYI the Structure offset page of the reference docs is very handy when manually disassembling
paraj is offline  
Old 13 November 2023, 20:25   #4
fstarred
Registered User
 
fstarred's Avatar
 
Join Date: Mar 2018
Location: Rome
Posts: 173
Quote:
Originally Posted by thomas View Post
A WORD must be at an even address. Because of this the C compiler adds an additional pad byte between DrawMode and LeftEdge so that LeftEdge starts at offset 4.
Oh you are correct sir

Quote:
FYI the Structure offset page of the reference docs is very handy when manually disassembling
This is absolutely a must, thank u for sharing it
fstarred is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Technical reference manuals rlake request.Other 20 27 July 2021 00:03
AmiBlitz command reference? smartroad Coders. Blitz Basic 16 15 November 2019 21:43
Settlers - Reference card gazj82 support.Games 2 14 December 2014 15:07
Assembly reference bobster Coders. Tutorials 1 20 March 2013 23:16
Developer looking for reference material. MortUK Retrogaming General Discussion 7 23 April 2008 01:38

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:55.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07168 seconds with 15 queries