News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

.FOR built in JWasm

Started by habran, July 03, 2012, 11:38:29 PM

Previous topic - Next topic

habran

Cod-Father

jj2007

#76
Thanks, will check tonight. Could be related to WriteConsoleInput. Most of the time Win7-32 and Win7-64.32 are compatible but there are some surprises (for ex, the Win7-64 32-bit APIs trash xmm regs while their Win7-32 bit counterparts don't...).

EDIT: Just tested on Win7-64, it works like a charm. So either you are pulling my leg, or there is some interference from a crappy AV.

habran

I was not pulling your leg it was not working
however, this morning it works properly and when I run it this pops out:
"Please enter your name: Habran"
maybe my machine was tired after whole day running :icon_eek:
no, she is young :P
she just let me know that she doesn't like BASIC either :bgrin:
Cod-Father

habran

Interesting, now I put it on my desktop and now behaves again as before :icon_eek:

and after writing the line above I tried to run it again and it worked again as it supposed to
I am curies if someone else had the same behavior

what did you do jj? did you put a poison in your program?
do you want to poison my machine? :shock:
Cod-Father

jj2007

Quote from: habran on February 06, 2013, 06:07:55 AM
what did you do jj? did you put a poison in your program?
do you want to poison my machine? :shock:

Beware of evil BASIC programmers, Habran. Or open the source and have a look. Or run it in Olly - that would actually be the best idea, because you could find out where it starts misbehaving. My guess is the problems start before the entry point - AV or other watchdogs in the system that discover that somewhere this proggie uses deprecated instructions like lodsd or pushad :icon_mrgreen:

OTOH, I never had problems on Win7-64, except for the trashing of xmms (but that was solved some months ago). What AV are you using, if any? Jotti says F-PROT believes it's a dangerous malicious something, they call it W32/FakeAlert.FJ.gen!Eldorado :greensml:

habran

#80
hey jj, you evil programmer,  :badgrin:
I am using Microsoft Security Essentials
and sins than my computer is running like a charm  :t
I was busy till now earning my living and now I will look inside your evil BASIC  :biggrin:
Cod-Father

jj2007

 :biggrin: Me too MSE, although some say it's fast because it's so superficial that it never finds anything :greensml:

In case you are using Olly:
- does it load fast (i.e. via the Open menu)? Sometimes Olly takes ages to analyse the main module...
- if you hit F9, does it show the prompt immediately, or does it hang somewhere?

habran

when I run it with olly it takes long to analyze but when I press F9 text appears immediately
but when I run it by itself it takes probably about 10 seconds for text to appear and than if you want to close
it takes again about 10 seconds but it closes itself

sorry, I don't like olly because the font is to small and it is very hard to read it
I tried to change the font size but it is Mission Impossible Vll with Oleh Yuschuk as main character :icon13:

as I said before I don't do 32 bits anymore
that is why I use WinDbg or M$V$ (BASIC!) you love it :P
Cod-Father

habran

If you build it as a DEBUG version an supply .pdb
I can look at it otherwise forget about it :bgrin: 
Cod-Father

jj2007

Quote from: habran on February 06, 2013, 10:24:53 PM
If you build it as a DEBUG version an supply .pdb
I can look at it otherwise forget about it :bgrin:

Here it is, enjoy. However, the behaviour you describe means the prog works fine, but the OS "reflects" a lot before executing it. I see that behaviour often in office environments, also for pure Masm32 apps. Ten seconds is a lot, though :P

Re Olly's font: Right-click, "Appearance" at the bottom, Font, System fixed font should do fine.

habran

Japheth
you know C pretty, pretty, pretty... good and if you wrote strcpy() routine it would probably behave better than it does now ;)
Quote
And I'm not going to "make a career", because I'm in an age where a career has already been made - or doesn't happen at all, as in my case 
why, are  you already dead?  :icon_eek:
Cod-Father

japheth

Quote from: habran on February 07, 2013, 06:29:37 AM
why, are  you already dead?  :icon_eek:

It's not on my agenda. IMO working in the IT business is no fun at all.

frktons

Quote from: japheth on February 08, 2013, 12:34:26 AM

IMO working in the IT business is no fun at all.

Some people seem to enjoy IT business, others a bit less.
It all depends on personal history in the field. But I think,
anyway, there is a time when you enjoy/enjoyed it.
There are only two days a year when you can't do anything: one is called yesterday, the other is called tomorrow, so today is the right day to love, believe, do and, above all, live.

Dalai Lama

habran

JJ2007,
Delay was my machine because I had open to many apps
here is a beauty in asm:

include \masm32\include\masm32rt.inc
.data?
  buffer db 132 dup (?)
align 4
CTEXT MACRO text:VARARG
local TxtA
.data
TxtA BYTE text,0
.code
EXITM <ADDR TxtA>
ENDM

.code

main PROC
        invoke StdOut,CTEXT("Please enter your name: ")
        invoke StdIn,ADDR buffer,128
        invoke StdOut,CTEXT("You have beautiful name ")
        invoke StdOut,ADDR  buffer
  invoke StdOut,CTEXT("Press any key to continue . . .")
  invoke wait_key
  invoke ExitProcess, 0
  ret
main ENDP
END main

and here in C:

#include <stdio.h>
int main()
{
  char answer[256];
  printf ("Please enter your name: ");
  fgets(answer, 256, stdin);
  printf ("You have beautiful name %s\n ", answer);
  return 0;
}
Cod-Father

frktons

Quote from: habran on February 08, 2013, 10:57:35 AM

... in C:

#include <stdio.h>
int main()
{
  char answer[256];
  printf ("Please enter your name: ");
  fgets(answer, 256, stdin);
  printf ("You have beautiful name %s\n ", answer);
  return 0;
}

You know Habran, the keyboard god doesn't allow italian guys to type that
code easily, if they want to type all those nice "{}" they have to cramp their
fingers a bit. This is one of the reasons I gave up studying C and moved to MASM.
:P
 
There are only two days a year when you can't do anything: one is called yesterday, the other is called tomorrow, so today is the right day to love, believe, do and, above all, live.

Dalai Lama