Message board for the users of flat assembler.
> Windows > HLA library and fasm
I know this is probably a question I should asking the folks who created HLA but I figured I would ask here first.
I don't know too much 32 bit Assembly, but I did take an Assembly course last semester and we used 16 bit (I loved those interrupts!)...anyways, to get myself up to speed on the latest technology I decided to dive into 32 bit assembly. The only problem here seems that the code that HLA generates FASM doesn't like EVEN THOUGH hla has fasm built in.
Here is a scenario:
I have a simple hello, world application:
Program HelloWorld; #include ("stdlib.hhf"); begin HelloWorld; stdout.put("Hello,world!",nl); end HelloWorld;
When I run "hla -?" I scroll through the help and find:
-sf Compile to FASM source files only.
So I try:
hla -sf test.hla
This generates test.asm (attached)
So, one would assume to just assemble it using fasm right?
C:\asm>fasm test.asm test.exe
flat assembler version 1.66
3 passes, 704 bytes.
Great! It assembled (or complied...someone wanna kindly explain that to me again, its almost 11PM and my mind is getting kind of tired ).
I try to run it:
So I clean up the "project" (delete asm, link and obj file). And try to compile with the built in fasm to hla.
-xo Compile/assemble/link to object internal FASM back-end (Windows only ).
C:\asm>hla -xo test.hla POLINK: warning: /SECTION:.bss ignored; section is missing.
It did generate an executable!
So I try to run it:
C:\asm>test Hello,world! C:\asm>
I did do a search for HLA under Windows on this forum and came up with this thread: http://board.flatassembler.net/topic.php?t=6778 BUT the -fasm parameter is not legal.
Am I missing something when trying to assemble with fasm?
|04 Aug 2009, 03:50||
I don't remember which version of HLA I used on that post, but it did worked.
Now, I'm using HLA v1.101 build 13200, and yes, I'm experiencing the same problem.
Maybe we should ask Randall?
Anyway, I think he's been absent from this board for a long time...
|04 Aug 2009, 04:43||
Anyone have Randall's email? .
I am using version:
Version 1.106 build 21508 (prototype)
I think I will try to hunt down an earlier version and see what happens.
I just told hla (current version) to output to masm
C:\asm>hla -sm test.hla
masm assembled it:
C:\asm>ml.exe /I. /Zm /c /Ta test.asm Microsoft (R) Macro Assembler Version 6.14.8444 Copyright (C) Microsoft Corp 1981-1997. All rights reserved. Assembling: test.asm
But, it refuses to link it:
C:\asm>link test Microsoft (R) Incremental Linker Version 5.12.8078 Copyright (C) Microsoft Corp 1992-1998. All rights reserved. test.obj : warning LNK4033: converting object format from OMF to COFF LINK : fatal error LNK1561: entry point must be defined
Am I doing something wrong or is hla not working right? Btw, I am merely just trying to compile the hello, world application at my first post.
|04 Aug 2009, 16:13||
Sorry, I usually don't double post but I feel this is worthy enough:
I have discovered how to compile with MASM by following the instructions on this page:
ml /c /coff /Cp hw.asm link -subsystem:console /heap:0x1000000,0x1000000 /stack:0x1000000,0x1000000 /BASE:0x3000000 /machine:IX86 -entry:?HLAMain @hw.link -out:hw.exe kernel32.lib user32.lib c:\hla\hlalib\hlalib.lib hw.obj
I still can't get fasm to compile the asm file.
However, all is not lost - from the verbose message:
When I run
hla -v test.hla
Compiling "test.hla" to "test.obj" Compilation complete, 18698 lines, 0.173 seconds, 108081 lines/second Using flat assembler version C1.66 3 passes, 704 bytes. -- -------------------- Linking via [polink @"test.link._.link"] POLINK: warning: /SECTION:.bss ignored; section is missing.
I think the backend FASM compiles it to test.obj but then it uses polink to link it. But I can't quite figure out HOW its linking it.
Doesn't work, but at least its a step in the right direction I think because I was able to compile and link with masm .
|05 Aug 2009, 02:39||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.
Website powered by rwasa.