English Amiga Board


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

 
 
Thread Tools
Old 03 October 2011, 12:54   #21
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Quote:
Originally Posted by StingRay View Post
What I wrote is completely correct. The question was about ds.b vs. dcb.b and what happens to the executable size. That there are lots of other ways to deal with hunks is irrevelant here.
Except that it's not correct.

AmigaOS has always had support for uninitialized space in executables not just as BSS (the correct meaning is Block Started by Symbol) but after any code and data as well.

Corresponding source and 48 byte executable below, try it yourself and check memory usage while it's running.
Code:
wait   btst   #6, $bfe001
       bne    wait
       rts

       ds.b   1000000
Attached Files
File Type: txt test.exe.txt (48 Bytes, 310 views)
Leffmann is offline  
Old 03 October 2011, 13:06   #22
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
While I'm about and I think of it - is there a best single resource for learning more about the OS and how it functions and file loading / hunks etc. etc.

It's the stuff I know least about - I understand the hardware fairly well I think but not the OS and how to interact with it or how it itself interacts with the hardware.

That's probably a very stupid question and more than likely I'll be admonished to look at RKRM Libraries & Devices or Includes & Autodocs or something but I've got those books and to be honest I find them to be a little too "C-centric" for my tastes. Any decent docs / tutorials about that explain this stuff nicely in an assembly language context...?
pmc is offline  
Old 03 October 2011, 20:16   #23
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by Leffmann View Post
Except that it's not correct.
What I wrote is perfectly correct as much you dislike it. That I didn't mention every OS detail to keep things simple doesn't automatically mean it's incorrect what I wrote.

Quote:
Originally Posted by Leffmann View Post
AmigaOS has always had support for uninitialized space in executables not just as BSS
Did I write the opposite anywhere in this thread?

Quote:
Originally Posted by Leffmann View Post
(the correct meaning is Block Started by Symbol)
That's not the "correct" meaning. But since it's quite pointless to discuss this (and won't help anyone here in this thread) I'll just say that all you wrote here is correct and everything I wrote is incorrect so you'll be happy.
StingRay is offline  
Old 04 October 2011, 00:28   #24
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 744
Hey stinger, so with the loading from hard drive, I could have complete control of the system, copper, blitter etc. As long at the port timer int is reactivAted, it will work. As thats a level two int, I take it running that with a CIA music timer at the same time is goon to cause an issue? Or am I thinking of a level 3 int?
h0ffman is offline  
Old 04 October 2011, 09:52   #25
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,499
Quote:
Originally Posted by StingRay View Post
In a BSS section (where you can only use ds.b)
That's an interesting question, BTW. Should it be disallowed to use anything but DS in a BSS section? I made no such restriction in vasm, so all directives are allowed, but just their size is recognized. The contents is lost as everything will turn to zero.

For example AsmOne will also accept DCB with a nonzero contents (like vasm), while Devpac doesn't allow DCB, just DS. What is most compatible?

Probably to allow everything, to make all sources assemble...?
phx is offline  
Old 04 October 2011, 09:56   #26
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,499
Quote:
Originally Posted by Leffmann View Post
AmigaOS has always had support for uninitialized space in executables not just as BSS (the correct meaning is Block Started by Symbol) but after any code and data as well.
That's true. Important to know is that this area (I often call it a data-bss section), is only cleared beginning with Kickstart 2.0. Before you had to clear it yourself.

BTW, this feature is quite common in other file formats as well (e.g. ELF).
phx is offline  
Old 19 October 2011, 16:50   #27
Nut
Registered User
 
Join Date: Feb 2010
Location: Helsinki, Finland
Posts: 36
Quote:
Originally Posted by Geijer View Post
The problem with taking over the system totally is that you can not load data from hard drive, the days of trackdisk loading routines are unfortunantely over
I need a good way to bang the hardware and still load data from the hard drive or is it best practice to use "loading scenes" where the system is temporarily enabled.
(let me know if you think I am stealing your thread)
Disable level6 interrupt. That will disable system. When you need to load something enable I/O and level3 (needed for blitter, disk loading uses blitter). After you've loaded you can disable I/O and replace level3 vector for your own again. I never attach my vectors to system the proper way. I just change the vectors on the fly. Needless to say my programs don't multitask.

If you don't use blitter yourself then you can do your own level3 interrupt routine which checks if it was blitter that called, and in that case traps the system level3 vector. So you don't necessarily have to shuffle I/O and level3 all the time. You can keep them ON all times this way.

Or you can do stuff the proper way. But that's not cool
Nut is offline  
Old 31 October 2011, 13:10   #28
Wepl
Moderator
 
Wepl's Avatar
 
Join Date: Nov 2001
Location: Germany
Posts: 866
Quote:
Originally Posted by weiju View Post
Hi,

when I programmed the Amiga the first time around, I always had been using it with the operating system turned on. I was now interested into poking into the hardware registers directly. Since I often read about that you have to deactivate the operating system, I was wondering what would be the best approach to do that so I can still do something like starting the program from DOS, work directly on the hardware and after exiting, I can continue using the system again. Do I really have to deactivate everything (e.g. Exec and DOS) or only parts ?
For starting developing hardware related code I can recommend WHDLoad. You will get disable/restore of the system, simple api to load/save files and if you have an mmu many valuable debugging support like memory protection, custom/cia register snoop/check and more.
If you want to release it without WHDLoad later you could encapsulate the api-calls using macros.
Wepl 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
crappy direct X in winuae 2.30? trydowave support.WinUAE 1 06 January 2011 18:30
Direct ISO support TEOL support.WinUAE 3 11 February 2007 11:27
a1200 and direct SCSI pbareges support.Hardware 2 08 August 2006 02:25
Hardware port programming. CLK on parallel. redblade Coders. General 0 29 March 2005 11:19

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 21:07.

Top

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