flat assembler
Message board for the users of flat assembler.
Index
> Windows > HLA library and fasm |
Author |
|
adamsna 04 Aug 2009, 03:50
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: Code: 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: Code: C:\asm>test.exe C:\asm> Strange... So I clean up the "project" (delete asm, link and obj file). And try to compile with the built in fasm to hla. Code: -xo Compile/assemble/link to object internal FASM back-end (Windows only ). Code: 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: Code: 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 |
|
adamsna 04 Aug 2009, 16:13
TmX wrote: Hi adamsna, 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. Edit: I just told hla (current version) to output to masm Code: C:\asm>hla -sm test.hla masm assembled it: Code: 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: Code: 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 |
|
adamsna 05 Aug 2009, 02:39
Sorry, I usually don't double post but I feel this is worthy enough:
So: I have discovered how to compile with MASM by following the instructions on this page: http://web.mac.com/randyhyde/HighLevelAsm/WinDownload.html Code: 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 BUT! I still can't get fasm to compile the asm file. However, all is not lost - from the verbose message: When I run Code: hla -v test.hla Code: 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. Running Code: polink @"test.link._.link" 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 > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.