- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
I am currently working on an assembly design that will require the equivalent of a .h file in which I can# define certain constants used in the design. I am aware of doing this in c of course, but not assembly. Is there any way I can do this outside of the .data section in my .s file? My design is generic and I would hate to have to hard code these values in my code. Thanks, MattLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The convention with GCC is to use .S (upper case) for assembler files that need to be pre-processed and .s (lower case) for files that do not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- The convention with GCC is to use .S (upper case) for assembler files that need to be pre-processed and .s (lower case) for files that do not. --- Quote End --- I am not entirely sure what to do with this .S file. Am i able to include .c files here, or# define constants in here directly? Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- The convention with GCC is to use .S (upper case) for assembler files that need to be pre-processed and .s (lower case) for files that do not. --- Quote End --- I believe I have it figured out. Please let me know if anything I have stated is invalid. I will want to change my file extension to .S. In this file, i will# include a header.h file that will contain my# defines for whatever constants I want. When I go to build, The GCC compiler will preprocess my request to include the header.h file.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page