flat assembler
Message board for the users of flat assembler.

Index > Main > Output file extention.

Author
Thread Post new topic Reply to topic
KostX



Joined: 19 Sep 2012
Posts: 41
KostX 22 Nov 2013, 01:45
Could u tell me, please. How to change output file format within source file?
Is this even possable? I've tried to use 'format ZOM' directive, doesn't work (causes compile error).

The problem is this: when I compile the file, I've '.bin' file. I want to describe data in file which after compile has '.zom' extention.

Here's code (contants data array only, no code):
Code:
;format 'ZOM'


include 'OpenGL\opengl_const.inc'
include 'OpenGL\opengl_macros.inc'

HeaderSize = pMeshFile - Header
FileSize   = EndOfFile - Header

     Header:
          ; File ID and submeshes count
          dd  'ZOM'                ; FileID
          dd  2                    ; Count of submeshes

          ; Submesh 1 descriptor
          db  'Cube',         0    ; Submesh name
          dd  GL_QUADS             ; Mesh consists of quads
          db  'Texture1.bmp', 0    ; Has texture, overwise this parameter is zero.
          dd  4*6                  ; Count of mesh consistens
          dd  pMeshFile            ; Offset to mesh data (Submesh address within ZOM file)

          ; Submesh 2 descriptor
          db  'Quad',         0    ; Submesh name
          dd  GL_QUADS             ; Mesh consists of quads
          db  'Texture2.bmp', 0    ; Has texture, overwise this parameter is zero.
          dd  4*1                  ; Count of mesh consistens
          dd  pQuad                ; Offset to mesh data (Submesh address within ZOM file)

     pMeshFile:
          dd  -1.0,-1.0            ; Texture
          dd   1.0, 0.0, 0.0, 1.0  ; Color
          dd   0.0, 0.0, 1.0       ; Normal
          dd  -1.0,-1.0, 1.0       ; Verticle
          dd   1.0,-1.0            ; Texture
          dd   1.0, 0.0, 0.0, 1.0  ; Color
          dd   0.0, 0.0, 1.0       ; Normal
          dd   1.0,-1.0, 1.0       ; Verticle
          dd   1.0, 1.0            ; Texture
          dd   1.0, 0.0, 0.0, 1.0  ; Color
          dd   0.0, 0.0, 1.0       ; Normal
          dd   1.0, 1.0, 1.0       ; Verticle
          dd  -1.0, 1.0            ; Texture
          dd   1.0, 0.0, 0.0, 1.0  ; Color
          dd   0.0, 0.0, 1.0       ; Normal
          dd  -1.0, 1.0, 1.0       ; Verticle


          dd  -1.0,-1.0            ; Texture
          dd   0.0, 1.0, 0.0, 1.0  ; Color
          dd   0.0, 0.0,-1.0       ; Normal
          dd  -1.0,-1.0,-1.0       ; Verticle
          dd   0.0, 0.0            ; Texture
          dd   0.0, 1.0, 0.0, 1.0  ; Color
          dd   0.0, 0.0,-1.0       ; Normal
          dd  -1.0, 1.0,-1.0       ; Verticle
          dd   1.0, 1.0            ; Texture
          dd   0.0, 1.0, 0.0, 1.0  ; Color
          dd   0.0, 0.0,-1.0       ; Normal
          dd   1.0, 1.0,-1.0       ; Verticle
          dd   1.0,-1.0            ; Texture
          dd   0.0, 1.0, 0.0, 1.0  ; Color
          dd   0.0, 0.0,-1.0       ; Normal
          dd   1.0,-1.0,-1.0       ; Verticle

          dd  -1.0, 1.0            ; Texture
          dd   0.0, 0.0, 1.0, 1.0  ; Color
          dd   0.0, 1.0, 0.0       ; Normal
          dd  -1.0, 1.0,-1.0       ; Verticle
          dd  -1.0, 1.0            ; Texture
          dd   0.0, 0.0, 1.0, 1.0  ; Color
          dd   0.0, 1.0, 0.0       ; Normal
          dd  -1.0, 1.0, 1.0       ; Verticle
          dd   1.0, 1.0            ; Texture
          dd   0.0, 0.0, 1.0, 1.0  ; Color
          dd   0.0, 1.0, 0.0       ; Normal
          dd   1.0, 1.0, 1.0       ; Verticle
          dd   1.0, 1.0            ; Texture
          dd   0.0, 0.0, 1.0, 1.0  ; Color
          dd   0.0, 1.0, 0.0       ; Normal
          dd   1.0, 1.0,-1.0       ; Verticle

          dd   0.0, 0.0            ; Texture
          dd   1.0, 0.5, 0.0, 1.0  ; Color
          dd   0.0,-1.0, 0.0       ; Normal
          dd  -1.0,-1.0,-1.0       ; Verticle
          dd   1.0,-1.0            ; Texture
          dd   1.0, 0.5, 0.0, 1.0  ; Color
          dd   0.0,-1.0, 0.0       ; Normal
          dd   1.0,-1.0,-1.0       ; Verticle
          dd   1.0,-1.0            ; Texture
          dd   1.0, 0.5, 0.0, 1.0  ; Color
          dd   0.0,-1.0, 0.0       ; Normal
          dd   1.0,-1.0, 1.0       ; Verticle
          dd  -1.0, 1.0            ; Texture
          dd   1.0, 0.5, 0.0, 1.0  ; Color
          dd   0.0,-1.0, 0.0       ; Normal
          dd  -1.0,-1.0, 1.0       ; Verticle

          dd   1.0,-1.0            ; Texture
          dd   1.0, 0.0, 1.0, 1.0  ; Color
          dd   1.0, 0.0, 0.0       ; Normal
          dd   1.0,-1.0,-1.0       ; Verticle
          dd   1.0, 1.0            ; Texture
          dd   1.0, 0.0, 1.0, 1.0  ; Color
          dd   1.0, 0.0, 0.0       ; Normal
          dd   1.0, 1.0,-1.0       ; Verticle
          dd   1.0, 1.0            ; Texture
          dd   1.0, 0.0, 1.0, 1.0  ; Color
          dd   1.0, 0.0, 0.0       ; Normal
          dd   1.0, 1.0, 1.0       ; Verticle
          dd   1.0,-1.0            ; Texture
          dd   1.0, 0.0, 1.0, 1.0  ; Color
          dd   1.0, 0.0, 0.0       ; Normal
          dd   1.0,-1.0, 1.0       ; Verticle

          dd  -1.0,-1.0            ; Texture
          dd   0.0, 1.0, 1.0, 1.0  ; Color
          dd  -1.0, 0.0, 0.0       ; Normal
          dd  -1.0,-1.0,-1.0       ; Verticle
          dd  -1.0,-1.0            ; Texture
          dd   0.0, 1.0, 1.0, 1.0  ; Color
          dd  -1.0, 0.0, 0.0       ; Normal
          dd  -1.0,-1.0, 1.0       ; Verticle
          dd  -1.0,-1.0            ; Texture
          dd   0.0, 1.0, 1.0, 1.0  ; Color
          dd  -1.0, 0.0, 0.0       ; Normal
          dd  -1.0, 1.0, 1.0       ; Verticle
          dd  -1.0,-1.0            ; Texture
          dd   0.0, 1.0, 1.0, 1.0  ; Color
          dd  -1.0, 0.0, 0.0       ; Normal
          dd  -1.0, 1.0,-1.0       ; Verticle

     pQuad:
          dd  -1.0,-1.0            ; Texture
          dd   1.0, 1.0, 1.0, 1.0  ; Color
          dd   0.0, 0.0, 1.0       ; Normal
          dd  -1.0,-1.0, 1.0       ; Verticle
          dd   1.0,-1.0            ; Texture
          dd   1.0, 1.0, 1.0, 1.0  ; Color
          dd   0.0, 0.0, 1.0       ; Normal
          dd   1.0,-1.0, 1.0       ; Verticle
          dd   1.0, 1.0            ; Texture
          dd   1.0, 1.0, 1.0, 1.0  ; Color
          dd   1.0, 1.0, 1.0       ; Normal
          dd   1.0, 1.0, 1.0       ; Verticle
          dd  -1.0, 1.0            ; Texture
          dd   1.0, 1.0, 1.0, 1.0  ; Color
          dd   0.0, 0.0, 1.0       ; Normal
          dd  -1.0, 1.0, 1.0       ; Verticle
     EndOfFile:    


I can't find another way, help me, please.
Post 22 Nov 2013, 01:45
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20306
Location: In your JS exploiting you and your system
revolution 22 Nov 2013, 01:58
Let's check the manual:
Quote:
format directive followed by the format identifier allows to select the output format. This directive should be put at the beginning of the source. Default output format is a flat binary file, it can also be selected by using format binary directive. This directive can be followed by the as keyword and the quoted string specifying the default file extension for the output file. Unless the output file name was specified from the command line, assembler will use this extension when generating the output file.
Code:
format binary as 'ZOM'    
Post 22 Nov 2013, 01:58
View user's profile Send private message Visit poster's website Reply with quote
KostX



Joined: 19 Sep 2012
Posts: 41
KostX 22 Nov 2013, 02:09
Thank you. very much. Very Happy
Post 22 Nov 2013, 02:09
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.