English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 21 May 2021, 12:14   #41
admiral
Engineer
 
Join Date: Oct 2018
Location: Shadow realm
Posts: 165
Thanks for the comments.

Quote:
Originally Posted by Thomas Richter View Post
A couple of minor comments: The buffer size should probably align with a (multiple) of the block size of the medium. This is of course not strictly necessary, but having a block size aligned may allow the file system to "burst" directly into your buffer instead of copying through a second level buffer. I would suggest 1024 bytes.
I went for $1000 or 4096 or 1024*4 on the code above. It was very arbitrary, but still a multiple of the typical filesystem block payload size.

Quote:
Also, for a buffer that small you would not need to allocate memory, the stack would be sufficient.
For the purposes of this program, it could be. But I wrote it as a quick way to ensure I knew how to do basic doslib I/O. If I were to reuse code on something larger, I'd want to allocate a buffer.

Stack is typically at least 4KB, but could go much lower. Detecting stack size is also extra work, which does also require different code for Workbench and CLI.

Quote:
Last but not least, "*" is not deprecated. There is a small subtle difference between CONSOLE: and "*", and without knowing anything else, I would suggest to go for "*". "*" is the current console, "CONSOLE:" is the default console. It doesn't make a difference with CON: right now, but it may make a difference in the future to allow "job control".
Deprecation comment was based on documentation. Specifically, http://amigadev.elowar.com/read/ADCD.../node02D6.html claims:

Code:
    The 'name' can be a filename (optionally prefaced by a device
    name), a simple device such as NIL:, a window specification such as
    CON: or RAW: followed by window parameters, or "*", representing the
    current window.  Note that as of V36, "*" is obsolete, and CONSOLE:
    should be used instead.
While I tried to follow that recommendation, it turned out to not work on kick34/AmigaOS 1.3, leaving just "*" as an option.

Last edited by admiral; 21 May 2021 at 12:25. Reason: grammar
admiral 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
screenshot of my current project ara Coders. General 10 08 October 2012 17:07
My current mini-project. Desverger support.Hardware 0 21 August 2004 06:44
limit to files in a directory? yadster support.Hardware 7 09 August 2003 15:00
assembly TV L8-X Amiga scene 2 04 August 2002 02:36

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 19:53.

Top

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