News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

New GoAsm feature: DATABLOCK

Started by jorgon, March 06, 2006, 10:26:58 PM

Previous topic - Next topic

jorgon

I needed this in another project.  It may not be much, but some people might find it useful.

You can now use in GoAsm
MyBlockData DATABLOCK_BEGIN       ;comment
   .
   Data goes here
   .
DATABLOCK_END


Here all the material between DATABLOCK_BEGIN and DATABLOCK_END is inserted in the output file, and you can then address the data using the label MyBlockData.
GoAsm regards the data as starting just after the end of the line holding DATABLOCK_BEGIN, and as ending at the end of the last line before DATABLOCK_END.
The data is inserted in its raw state (no conversion takes place). This means that characters which may not be displayed in an ordinary editor such as spaces or tabs will also be loaded. It also means that the format of the data and the characters which can be used in the data are limited only by the editor you are using to write the source code.

The idea is that this avoids having to add a data declaration such as DB at the beginning of every line of data.
GoAsm still supports INCBIN which does the same thing except that the data is loaded from a file.

This feature is in GoAsm Version 0.55.03 beta available from here.

Author of the "Go" tools (GoAsm, GoLink, GoRC, GoBug)

jorgon

Actually I've discovered that the line count is not maintained over the DATABLOCK in GoAsm 0.55.03
I've fixed this and the fix will be in the next version of GoAsm.
Meanwhile if anyone would like the fixed version, they could email me or send a private message.
Author of the "Go" tools (GoAsm, GoLink, GoRC, GoBug)

donkey

Hi Jeremy,

I'm still trying to figure out how I might use it :) I have some projects that include an encrypted block that I use INCBIN for, it might serve well as the file is only a few hundred bytes of printable ascii.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

zooba

Looks like it'd be perfect for a usage display for a console app :U

szMLUsage DATABLOCK_BEGIN
Microsoft (R) Macro Assembler Version 7.10.4035
Copyright (C) Microsoft Corporation.  All rights reserved.

usage: ML [ options ] filelist [ /link linkoptions]
Run "ML /help" or "ML /?" for more info
DATABLOCK_END

Bracx

I can see some uses for this. Makes entering some
types of data easier.

Thanks!