Author Topic: Poasm supported by Pelles C run-time library  (Read 22282 times)

Vortex

  • Moderator
  • Member
  • *****
  • Posts: 1711
Poasm supported by Pelles C run-time library
« on: May 23, 2012, 03:17:31 AM »
Here is a quick demo using the function _splitpath from Pelles C run-time static library crt.lib

_splitpath depends on the function strncpy which is extracted automatically from crt.lib


Code: [Select]
include     splitpathDemo.inc

.data

path1       db 'D:\PellesC\project\splitpath.asm',0
f1          db 'drive = %s',13,10
            db 'dir   = %s',13,10
            db 'name  = %s',13,10
            db 'ext   = %s',13,10,0

.data?

buffer      db 128 dup(?)
drive1      db 4 dup(?)
dir1        db 32 dup(?)
name1       db 16 dup(?)
ext1        db 4 dup(?)

.code

start:

    invoke  _splitpath,ADDR path1,ADDR drive1,ADDR dir1,\
            ADDR name1,ADDR ext1

    invoke  wsprintf,ADDR buffer,ADDR f1,ADDR drive1,ADDR dir1,ADDR name1,\
            ADDR ext1

    invoke  StdOut,ADDR buffer
    invoke  ExitProcess,0

END start

Adamanteus

  • Member
  • **
  • Posts: 182
Re: Poasm supported by Pelles C run-time library
« Reply #1 on: May 24, 2012, 04:03:02 AM »
Annoying but actual - somebody could say to Pellec, that need support MASM in Pelles C IDE somehow  :icon_exclaim:

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4875
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Poasm supported by Pelles C run-time library
« Reply #2 on: May 24, 2012, 04:15:37 AM »
Trust me here, there is nothing wrong with POASM, its a very good tool. It has different macro notation to MASM but it does Intel spec assembler notation fine.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

Vortex

  • Moderator
  • Member
  • *****
  • Posts: 1711
Re: Poasm supported by Pelles C run-time library
« Reply #3 on: May 24, 2012, 04:19:06 AM »
Hi Adamanteus,

No need to contact Pelle for this task. Follow the path :

Project -> Project Options -> Macros

Modify AS to reflect the path of ml.exe : \masm32\bin\ml.exe
Modify ASFLAGS to : /c /coff

Greenhorn

  • Member
  • **
  • Posts: 93
Re: Poasm supported by Pelles C run-time library
« Reply #4 on: May 24, 2012, 04:48:38 AM »
Trust me here, there is nothing wrong with POASM, its a very good tool. It has different macro notation to MASM but it does Intel spec assembler notation fine.
I totally agree. POASM has a lot of nice features I wished MASM/JWASM would support.  ;)
But I think we get a little bit offtopic here.

Thanks for the example, Vortex.


Regards
Greenhorn

Vortex

  • Moderator
  • Member
  • *****
  • Posts: 1711
Re: Poasm supported by Pelles C run-time library
« Reply #5 on: August 04, 2012, 03:27:51 AM »
Hi pavshinAN,

Welcome to the forum.

You are right and the differences in the macro syntax should not be a problem.

Vortex

  • Moderator
  • Member
  • *****
  • Posts: 1711
Re: Poasm supported by Pelles C run-time library
« Reply #6 on: August 23, 2012, 03:31:51 PM »
Hi RGyaznoff,

Welcome to the forum.

Adamanteus

  • Member
  • **
  • Posts: 182
Re: Poasm supported by Pelles C run-time library
« Reply #7 on: August 24, 2012, 01:08:35 AM »
I'm not glad of polink - it's not understand release msc library debug record 0 - and not linking  ::)
Vortex - much thanks.

Vortex

  • Moderator
  • Member
  • *****
  • Posts: 1711
Re: Poasm supported by Pelles C run-time library
« Reply #8 on: August 24, 2012, 01:17:42 AM »
Hi Adamanteus,

Thanks for your report.

If you found a bug, you can post Pelle's forum :

http://forum.pellesc.de/index.php

Pelle declares all the changes on every release :

http://www.smorgasbordet.com/pellesc/changes_650_700.htm

Vortex

  • Moderator
  • Member
  • *****
  • Posts: 1711
Re: Poasm supported by Pelles C run-time library
« Reply #9 on: November 01, 2012, 05:03:21 AM »
Hi NKjulanoff,

Welcome to the forum.

Yes, Poasm's macro notation is different but it can process simple Masm macros without problem.

Vortex

  • Moderator
  • Member
  • *****
  • Posts: 1711
Re: Poasm supported by Pelles C run-time library
« Reply #10 on: December 16, 2012, 10:08:03 PM »
Another example :

Code: [Select]
.386
.model flat,stdcall
option casemap:none

printf      PROTO C :VARARG
__bheapinit PROTO C :VARARG
__ioinit    PROTO C :VARARG
ExitProcess PROTO :DWORD

includelib  \PellesC\lib\Win\kernel32.lib
includelib  \Pellesc\lib\crt.lib

.data

str1        db 'Testing Pelles C static run-time library crt.lib',0

.code

start:

    invoke  __bheapinit
    test    eax,eax
    jz      finish
    invoke  __ioinit

    invoke  printf,ADDR str1

finish:

    invoke  ExitProcess,0

END start

japheth

  • Guest
Re: Poasm supported by Pelles C run-time library
« Reply #11 on: January 04, 2013, 05:13:25 PM »
I totally agree. POASM has a lot of nice features I wished MASM/JWASM would support.

Ok. However, "a lot" is not a absolutely rock-solid scientific term - I guess nowadays it's primarily used in the context "so many that you can't count them at a first, brief glance. So for some people "a lot" may be everything beyond 1. As for me, I'd say "a lot" starts with 17 ( for Dustin Hoffman in "Rain Man", "a lot" was clearly beyond 246 ).

 Now, after this clarification, would you please tell us the "lot of" nice features that POASM has but other assemblers are missing?

shantanu_gadgil

  • Guest
Re: Poasm supported by Pelles C run-time library
« Reply #12 on: January 04, 2013, 06:10:50 PM »
I really like the CINCLUDE of POASM. This allowed me to use the ".h" file emitted by the resource editor in ASM code.

This was until I "pestered"/"requested"  :greensml:  KetilO (ResEd) to add the necessary features in ResEd.
(This was before RadASM could edit the .rc like ResEd)

Regards,
Shantanu

japheth

  • Guest
Re: Poasm supported by Pelles C run-time library
« Reply #13 on: January 09, 2013, 06:56:26 PM »
RGyaznoff ...
AKabanchuk ...
NKjulanoff ...
NZavaloff ...
OLzenizin ...

Hm, I guess I talked to a bot  :icon_redface:. It sounds somewhat Russian...

Wasn't this forum supposed to have a smart bot-detection mechanism?
 


Gunther

  • Member
  • *****
  • Posts: 3515
  • Forgive your enemies, but never forget their names
Re: Poasm supported by Pelles C run-time library
« Reply #14 on: January 10, 2013, 04:56:34 AM »
Hi japheth,

It sounds somewhat Russian...

oh yes, he's from Moscow, Russia.

But never mind, welcome to the forum, OLzenizin. I think you're a real person, not a spam bot.

Gunther
Get your facts first, and then you can distort them.