Jump to content
IGNORED

DASM FCC psuedo op equiv


Mr SQL

Recommended Posts

Is anyone familiar with an FCC psuedo op equiv for DASM?

 

FCC (form constant character) allows a contiguous block of data to be formed without comma's.

 

.byte $f3,$a2,$f4,$e1

could be written as

.FCC $f3a2f4e1

 

FDB was another useful pseudo op that allowed two bytes between commas; I had used them with EDTASM+ in the 80's.

 

Link to comment
Share on other sites

I think the HEX preudo op does what you need.

From the dasm v.2.12 documentation:

 

[label] HEX hh hh hh..

This sets down raw HEX data. Spaces are optional between bytes.
NO EXPRESSIONS are allowed. Note that you do NOT place a $
in front of the digits. This is a short form for creating
tables compactly. Data is always layed down on a byte-by-byte
basis.

Example: HEX 1A45 45 13254F 3E12

Edited by alex_79
  • Like 1
Link to comment
Share on other sites

I don't think there is any directive for binary like you want, but the source to dasm is available and it could be added if you really need it.

Thanks I can't add it, I need the feature to be available by default to other programmers. Too bad theres no generic form or % prefix on the HEX block!

Link to comment
Share on other sites

That was my first thought, too-- that a macro might be possible.

 

What is the purpose of this? For example, is it going to be used to code playfield data? Are there any restrictions, needs, or wants as to how this is supposed to function, like needing the binary data to be flipped for every other byte's worth of 1s and 0s?

Link to comment
Share on other sites

That was my first thought, too-- that a macro might be possible.

 

What is the purpose of this? For example, is it going to be used to code playfield data? Are there any restrictions, needs, or wants as to how this is supposed to function, like needing the binary data to be flipped for every other byte's worth of 1s and 0s?

 

Great question SeaGtGruff! :)

I am using a 96x20 bit table to hold WYSIWYG bitmaps for large virtual worlds in my ASDK Framework and I wanted to have a smoother WYSIWYG format than having it interrupted by ",%" after every 8 characters.

 

 

Maybe you could use a macro?

Without a suitable psuedo op I'll probably just leave it but I'm curious, can a macro script easily drop in a block of binary WYSIWYG data (bitmap) similar to the HEX psuedo op, or do you end up writing a page of script?

Link to comment
Share on other sites

When defining a macro you can use {0} to get the entire parameter, which presumably would include a very long string of binary data-- although I'm not sure how you could then divide the string into substrings. It sounds like maybe you'd be best off writing a script or small program that would pre-process the bB program file before bB's own pre-processor, to look for lines that contain some keyword and then replace the binary string with the equivalent BYTE or HEX values, maybe like

 

 

mydata WYSIWYG 100110100111101011011001

 

being replaced by

 

 

mydata BYTE %10011010,%01111010,%11011001
Link to comment
Share on other sites

 

When defining a macro you can use {0} to get the entire parameter, which presumably would include a very long string of binary data-- although I'm not sure how you could then divide the string into substrings. It sounds like maybe you'd be best off writing a script or small program that would pre-process the bB program file before bB's own pre-processor, to look for lines that contain some keyword and then replace the binary string with the equivalent BYTE or HEX values, maybe like

mydata WYSIWYG 100110100111101011011001

being replaced by

mydata BYTE %10011010,%01111010,%11011001

 

That option would go nicely with a GUI version if someone were interested in developing a Visual ASDK :)

 

Right now it's form factor is a single asm file that supports using WYSIWYG bitmaps for the virtual worlds inline in the code. The bB compiler could be used to generate the Assembly for the gameloop, but the ASDK is a completely different Framework.

 

I like IDE's too but I prefer just to use a single file in a text editor with asm instead of using a Visual IDE, and also when coding in bB; it feels more retro :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...