17 January 2015, 15:00 | #21 |
Moderator
Join Date: Jan 2003
Location: ...
Age: 52
Posts: 1,838
|
Then you can use data section, or use one of the work arounds posted earlier, except for the one posted by Don which is incorrect - just calculate the number of bytes generated if the difference from the start of the section is e.g. 50...
|
17 January 2015, 21:29 | #22 | |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,975
|
Quote:
|
|
17 January 2015, 21:45 | #23 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
|
What makes you think so? All sections I have ever seen start on an 8-byte boundary in memory, because LoadSeg() allocates them with AllocMem().
Which post of Jim Drew? Any links? |
17 January 2015, 22:22 | #24 | ||
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Quote:
Quote:
Devpac missing alignment functionality isn't as bad as with C. Without GCCisms, one must use _Alignas from C11. Vbcc does support __alignof already so something like the following C11 stdalign.h should be possible. Code:
#ifndef __STDALIGN_H #define __STDALIGN_H /* #define __alignas _Alignas */ #define __alignof _Alignof #define __alignas_is_defined 0 #define __alignof_is_defined 1 #endif /* __STDALIGN_H */ Last edited by matthey; 17 January 2015 at 22:30. |
||
23 January 2015, 19:47 | #25 |
Registered User
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
|
Devpac can use any memory alignment (CNOP 0,16 - CNOP 0,128, etc.) I used CNOP 0,16 throughout FUSION, PCx, and anything that is going to be doing a bunch of stuff that I want to be guaranteed to be entirely in the cache.
|
23 January 2015, 23:18 | #26 |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Sure, you can specify CNOP 0,16 in Devpac but will you get it without a patch to AmigaOS that aligns memory allocations or hunks to more than 8 byte alignment? The start of the hunk has to have the same alignment or better than the CNOP alignment specified or the alignment may be less than requested.
|
23 January 2015, 23:57 | #27 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
|
Bigger alignments than 8 make sense when you don't use the AmigaDOS hunk format, but assemble for an absolute address.
Let's say you start your code with "org $10000". This will allow alignments up to "cnop 0,65536"... |
09 February 2015, 19:43 | #28 | |
Registered User
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
|
Quote:
For PCx the script file was: RUN >NIL: <NIL: load PCx.dat The load program makes AIBB, SysInfo, and a variety other benchmarks give you the same results every time. |
|
09 February 2015, 21:24 | #29 |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
Use RS to define your data structures, then put a single dcb.b in the BSS hunk with the total byte size.
Then one can do Code:
__RS set ((__RS-1)|3)+1 |
15 February 2015, 04:42 | #30 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,604
|
The basic problem is that CNOP is just a way of aligning data, a replacement for modifying "*" (program counter) as allowed by older assemblers. In a BSS section, it should become a DS and in code or data sections, it should become a DC of the appropriate size. Or the assembler should just skip a few bytes in memory in all cases, it should not matter to the developer.
It's a silly directive name, anyway. There's no real condition and certainly no CPU NOP instruction involved anywhere. |
18 March 2015, 23:12 | #31 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,604
|
Moved to the Assembler forums where it should be.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
cnop | phx | Coders. Asm / Hardware | 13 | 19 February 2015 21:33 |
newest ami/x and cnet bss | GreenMeanie | request.Apps | 1 | 16 September 2011 20:12 |
Off-topic section | BippyM | project.EAB | 3 | 29 January 2007 17:08 |
Section 8 ??? | plasmatron | Nostalgia & memories | 4 | 04 June 2004 20:40 |
Federation of the Free Traders + BSS Jane Seymour | haynor666 | MarketPlace | 0 | 06 June 2003 15:19 |
|
|