flat assembler
Message board for the users of flat assembler.

Index > Main > flat assembler 1.58

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 12 Feb 2005, 13:32
Now available in the Download section.

This is probably the last cleanup release before switching to the 1.6x line (with x86-64 support).

I've changed the packaging, so from now only one package for Win32 is available, containing both the command line version and IDE. I consider also adding some NSIS (or some other similar tool) based installer for Win32 version in future. The includes for Win32 version have been updated in a way, which allows to include them with any method - with the %FASMINC% variable, by specifying the full path or by doing just INCLUDE "WIN32AX.INC" with the INCLUDE variable properly set up (which is now recommended by fasm's docs).

Also documentation has been extended a bit, few more examples for some directives has been added. If you think some directive still needs more explanation or examples in official docs, please let me know. Generally all the existing features of fasm are mentioned in the docs, however some of the info may be hidden too well for anyone but me.


Last edited by Tomasz Grysztar on 12 Mar 2005, 18:50; edited 4 times in total
Post 12 Feb 2005, 13:32
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 12 Feb 2005, 13:38
Quote:

I consider also adding some NSIS (or some other similar tool) based installer for Win32 version in future.

Why? fasm is a tool for programmers, and programmers generally know how to handle .zip files? Smile
Post 12 Feb 2005, 13:38
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 12 Feb 2005, 13:43
Well, some people (beginners) asked for this. It would also set up the environment variables automatically, etc.
Post 12 Feb 2005, 13:43
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 12 Feb 2005, 14:07
True, it would be nice for beginners. I hope you'll keep distributing .zip releases though, for something like fasm having to install and then move/remove files would be annoying Smile
Post 12 Feb 2005, 14:07
View user's profile Send private message Visit poster's website Reply with quote
Embrance



Joined: 14 Mar 2004
Posts: 116
Location: Greece
Embrance 12 Feb 2005, 17:37
the v1.6 branch will support all current stuff,wont it?
Post 12 Feb 2005, 17:37
View user's profile Send private message MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 12 Feb 2005, 17:45
Of course.
Post 12 Feb 2005, 17:45
View user's profile Send private message Visit poster's website Reply with quote
bubach



Joined: 17 Sep 2004
Posts: 341
Location: Trollhättan, Sweden
bubach 12 Feb 2005, 18:10
How much will the 64-bit support add to the assembler size?
If you don't want to guess, whats the size of your current build?
Post 12 Feb 2005, 18:10
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 12 Feb 2005, 18:37
Go here to get the latest pre-release:
http://board.flatassembler.net/topic.php?t=3000
Post 12 Feb 2005, 18:37
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 12 Feb 2005, 20:31
Quote:
If you think some directive still needs more explanation or examples in official docs, please let me know.


Hi, everyone
This is more a windows question, but how about more explanations on using the 'rescource.inc' and 'if.inc' macros, this would be nice especially for beginners, or even assembly pros, but are new to windows/fasm assembly programming. And I'll ask my next question in the windows section.
MadMatt
Post 12 Feb 2005, 20:31
View user's profile Send private message Reply with quote
bubach



Joined: 17 Sep 2004
Posts: 341
Location: Trollhättan, Sweden
bubach 12 Feb 2005, 20:52
Ok.. Smile
Post 12 Feb 2005, 20:52
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 14 Feb 2005, 01:01
just wondering - how does modularity of fasm look now. I would really like it if you could change destination processor just by including other "x86.inc" and recompiling FASM.
Post 14 Feb 2005, 01:01
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
beppe85



Joined: 23 Oct 2004
Posts: 181
beppe85 14 Feb 2005, 02:14
vid wrote:
just wondering - how does modularity of fasm look now. I would really like it if you could change destination processor just by including other "x86.inc" and recompiling FASM.

I had to modify a few lines in PARSER.INC, ASSEMBLE.INC and EXPRESSI.INC for MIPS, but only the last was really needed to support a larger register size. I guess I could let others untouched if I don't wanted to bother with some intrinsic x86 stuff.

For this x86-64, I saw there's modifications in (almost) every file, but I guess was not structural ones.

_________________
"I assemble, therefore I am"

If you got some spare time, visit my blog: http://www.beppe.theblog.com.br/ and sign my guestmap
Post 14 Feb 2005, 02:14
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 14 Feb 2005, 05:52
The latest version (called 1.59.0 now) can be recompiled to either support x86-64 or nor just by using either the X86_64.INC or X86.INC include file.
Post 14 Feb 2005, 05:52
View user's profile Send private message Visit poster's website Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 14 Feb 2005, 09:07
I got 2 suggestions: couldn't you add this cursor resource macro for the regular Fasm Win32 archiv? This snippet should be in the "/INCLUDE/MACRO/RESOURCE.INC" file:
Code:
macro cursor group,[label,cursor_file]
 { common local count
    count = 0
   forward local data,size,position
    label dd RVA data,size+4,0,0
    virtual at 0
     file cursor_file:6,16
     load size dword from 8
     load position dword from 12
    end virtual
    data file cursor_file:10,4
    file cursor_file:position,size
    count = count+1
   common local header
    align 4
    group dd RVA header,6+count*14,0,0
    header dw 0,2,count
   forward local width,height
    virtual at 0
     file cursor_file:6,2
     load  width  byte from 0
     load  height byte from 1
    end virtual
    dw width,width+height,1,1
    dd        size+4
    dw        label#.resid
  common
   align 4 }
    

Not my code. It was posted here on the Fasm board some time ago, but I don't remember the author.

Another thing is, I moved some more variables/data from the interface files "FASM.ASM"/"FASM.INC" to the "VARIABLE.INC" file:
Code:

; flat assembler core variables
; Copyright (c) 1999-2005, Tomasz Grysztar.
; All rights reserved.

; Initialized variables:

_copyright dm 'Copyright (c) 1999-2005 Tomasz Grysztar',nl
_logo dm 'Flat Assembler version ',VERSION_STRING,nl
_usage dm 'usage: fasm [-m#] [-p#] source [output]',nl

_passes_suffix dm ' passes, '
_seconds_suffix dm ' seconds, '
_bytes_suffix dm ' bytes.',nl
_error_prefix dm 'error: '
_error_suffix dm '.',nl
_line_number_start dm ' ['
_line_data_start dm ':',nl

align 4

_include db 'INCLUDE',0

locals_counter db 7,'0000000'

; Uninitialized variables which have to be set up by interface:

memory_start dd ?
memory_end dd ?

additional_memory dd ?
additional_memory_end dd ?

input_file dd ?
output_file dd ?

passes_limit dw ?

; Uninitialized internal core variables:

current_pass dw ?

include_paths dd ?
free_additional_memory dd ?
source_start dd ?
code_start dd ?
code_size dd ?
real_code_size dd ?
written_size dd ?
headers_size dd ?

current_line dd ?
macros_list dd ?
macro_constants dd ?
macro_line dd ?
macro_block dd ?
macro_block_line dd ?
macro_block_line_number dd ?
macro_embed_level dd ?
struc_name dd ?
current_locals_prefix dd ?
fix_constants_count dd ?
equ_constants_count dd ?
anonymous_reverse dd ?
anonymous_forward dd ?
labels_list dd ?
label_hash dd ?
label_leaf dd ?
hash_tree dd ?
org_origin dq ?
org_registers dd ?
org_start dd ?
org_symbol dd ?
undefined_data_start dd ?
undefined_data_end dd ?
counter dd ?
counter_limit dd ?
error_line dd ?
error dd ?
display_buffer dd ?
structures_buffer dd ?
number_start dd ?
current_offset dd ?
value dq ?
fp_value rd 8
adjustment dq ?
symbol_identifier dd ?
address_symbol dd ?
address_high dd ?
format_flags dd ?
symbols_stream dd ?
number_of_relocations dd ?
number_of_sections dd ?
stub_size dd ?
stub_file dd ?
current_section dd ?
machine dw ?
subsystem dw ?
subsystem_version dd ?
image_base dd ?
resource_data dd ?
resource_size dd ?

next_pass_needed db ?
macro_status db ?
parenthesis_stack db ?
output_format db ?
code_type db ?
reloc_labels db ?
times_working db ?
virtual_data db ?
fp_sign db ?
fp_format db ?
value_size db ?
size_override db ?
value_undefined db ?
value_type db ?
address_size db ?
compare_type db ?
base_code db ?
extended_code db ?
postbyte_register db ?
segment_register db ?
operand_size db ?
mmx_size db ?
imm_sized db ?
jump_type db ?
operand_prefix db ?

characters rb 100h
converted rb 100h
    

Maybe someone should then remove the leading _ from some of these variables, thus "_usage" will become "usage".

Note that it's crucial here that the interfaces define their appropriate "dm" macro (define message, $-terminated for DOS, 0-terminated for all others) and "nl" (new line, 0Dh,0Ah for DOS/Win32, 0Ah for Linux/Unix) equate.

Another, only superficial rearrangement would be to melt the "_copyright" and "_usage" variables into 1, named "_info" variable, which will be displayed only if no/incorrect parameters were passed at program start.
This:
Code:
_copyright dm 'Copyright (c) 1999-2005 Tomasz Grysztar',nl
_logo dm 'Flat Assembler version ',VERSION_STRING,nl
_usage dm 'usage: fasm [-m#] [-p#] source [output]',nl
    

would become
Code:
_logo dm 'Flat Assembler version ',VERSION_STRING,nl
_info dm 'Copyright (c) 1999-2005 Tomasz Grysztar',nl,\
nl,\
'fasm [-m#] [-p#] source [output]',nl
    

Note that I also added the memory and passes switches for command line display with [-m#] [-p#].

_________________
MCD - the inevitable return of the Mad Computer Doggy

-||__/
.|+-~
.|| ||
Post 14 Feb 2005, 09:07
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 14 Feb 2005, 10:00
These variables (in fact: constants) are not common for all interfaces, therefore should not be included in core.

The "-m#" and "-p#" parameters can be specified anywhere in the command line (before, after, or even between the source and the output) - do you think listing them this way is the best form?
Post 14 Feb 2005, 10:00
View user's profile Send private message Visit poster's website Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 14 Feb 2005, 10:11
Privalov wrote:
The "-m#" and "-p#" parameters can be specified anywhere in the command line (before, after, or even between the source and the output) - do you think listing them this way is the best form?

Well, it's not perfect, but how would you manage this else? I find something like "[-memoryKb] [-passes]" a bit long.

Privalov wrote:
These variables (in fact: constants) are not common for all interfaces, therefore should not be included in core.
Ups, you're right. I missed the Win32 IDE interface, where those strings are elsewhere (string resources).

hm, what about the cursor resource macro? I find it rather handy.

_________________
MCD - the inevitable return of the Mad Computer Doggy

-||__/
.|+-~
.|| ||


Last edited by MCD on 14 Feb 2005, 10:49; edited 1 time in total
Post 14 Feb 2005, 10:11
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 14 Feb 2005, 10:33
Indeed, Win32 includes need many thing to be added, I will update them when finished with other things.
Post 14 Feb 2005, 10:33
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 16 Feb 2005, 08:12
Done. Smile
Post 16 Feb 2005, 08:12
View user's profile Send private message Visit poster's website Reply with quote
FlashBurn



Joined: 06 Jan 2005
Posts: 87
FlashBurn 19 Feb 2005, 11:20
I have some problems with the new version I hadn´t with the old!

Things like "mov ds, eax" don´t work anymore, if I´m in 32bit modus!

Also "SYSCALL" seems to be reserved label, why?!
Post 19 Feb 2005, 11:20
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 19 Feb 2005, 11:38
As I wrote in WHATSNEW.TXT, there was "more strict checking of operands for few instructions" added - "mov ds,eax" is in fact invalid instruction, since such MOV always uses 16-bit size (use "mov ds,ax" instead, there will be no any prefix added). However "mov eax,ds" is still allowed, because in this exceptional case the all 32 bits of target are affected (the value is zero-extended).

"syscall" and "sysret" are the new instructions (introduced by both AMD64 and Intel EM64T).
Post 19 Feb 2005, 11:38
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< 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.