Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jj2007

Pages: [1] 2 3 ... 10
1
Offtopic / Re: How old are you?
« on: 21. September 2018, 14:43:33 »
Is JJ still looking in? I see him at FB.

Occasionally, but at age 62 I must concentrate on my own babies ;)

2
General questions and discussions / Re: Beginner friendly BASICs
« on: 21. September 2018, 14:34:04 »
You see, this is where all the friction comes from.
..
Angry and bitter people are these; they get no joy from their pursuits unlike the coders who do it purely for fun.

In my experience, the angriest are those who code for a living. Of course, there are many who live well from coding and therefore are not angry and bitter. Sometimes I feel privileged to be retired. Coding just for pleasure, yeah, that's luxury ;)

3
Tutorials and articles / Re: Notes on Script BASIC
« on: 21. September 2018, 14:19:11 »
Nice that Python can handle that, but this ultra-short syntax is not necessarily good for readability. I am more comfortable with more explicit syntax:
Code: [Select]
  Dim x(11) As DWORD
  ArraySet x()=120, 135, 345, 345, 1890, 12, 120, 12, 135, 712, 78, 120
  ArraySort x(-) ; sort descending
  For_ ct=0 To x(?)-1
Print Str$(x(ct)), " "
  Next

4
Code and examples / Re: Text search
« on: 18. May 2018, 18:30:12 »
I tried out your program. Very nice.

Thanks ;-)

Quote
I do this programming thing mainly as a mental exercise. Maybe I can keep my old brain from going to a complete stop.

Compliments, you have really lots of good stuff on your site!

5
Code and examples / Re: Text search
« on: 17. May 2018, 18:36:15 »
    I'm not sure if it actually goes here, but I recently wrote a program that uses a text search.
    This program, written with NaaLaa, does a text search of a .exe file or any other type.

    It does a search for the letters "http". You can use this to see where a program might be reporting back to.

    Also, I would like to know if it works without having NaaLaa installed on your computer.
    That would tell me that I have all the needed Dll's.

    It is a Windows10 program.

Hi Rick,

It works fine on my Win7-64 machine. Attached my version; inter alia, there is a little file DownloadAndShow.exe that does something entirely harmless:

include \masm32\MasmBasic\MasmBasic.inc         ; download
  Init
  ; Let esi="http://retrogamecoding.org/board/index.php?topic=653"
  Let esi="356=cipot?php.xedni/draob/gro.gnidocemagorter//:ptth"
  PrintLine esi
   Let edi=FileRead$(Mirror$(esi))
   Inkey NoTag$(edi)
EndOfCode


Plus source & exe of a program that can detect, inter alia, the mirrored http:// in DownloadAndShow.exe ;-)

Just drag a file over SpyWareScanMB.exe, or launch it and pick a file.

P.S.: Thanks for the inspiration, Rick. In the Firefox installer (C:\Users\xxx\Documents\Firefox Installer.exe), it finds some goodies:
Code: [Select]
URLs found in "C:\Users\xxxx\Documents\Firefox Installer.exe":
http://schemas.microsoft.com/SMI/2005/WindowsSettings
http://ocsp.digicert.com
http://cacerts.digicert.com/DigiCertAssuredIDRootCA.crt
http://crl4.digicert.com/DigiCertAssuredIDRootCA.crl
http://crl3.digicert.com/sha2-assured-cs-g1.crl
http://ocsp.digicert.com
http://cacerts.digicert.com/DigiCertSHA2AssuredIDCodeSigningCA.crt
http://ts-ocsp.ws.symantec.com
http://ts-aia.ws.symantec.com/tss-ca-g2.cer
http://ts-crl.ws.symantec.com/tss-ca-g2.crl

Warning: While this proggie finds interesting http:// and https:// matches in exes and dlls, it is not a replacement for an AntiVirus. Malware writers use more sophisticated tricks to hide their URLs 8)

6
Code and examples / Re: Text search
« on: 14. May 2018, 18:47:23 »
SB is just an interpreter and as such, it can't compete with MASM speed-wise. Sometimes you should be more lenient to your opponents. :)

Hey, I didn't complain about speed differences :)

I was just curious why we came to different results - and you clarified the issue, thanks ;-)

7
Code and examples / Re: Text search
« on: 13. May 2018, 18:00:43 »
the absence of a character is not a character

Mike,
I had understood that when I saw the red matches posted above, thanks anyway. The logic is not that straightforward, I suppose it's documented somewhere. In any case, it's kind of an overkill for what is effectively a case-insensitive Instr().

Attached my version. It produces exactly the same output as John's version.

8
EGSL / Re: EGSL Website
« on: 13. May 2018, 17:45:36 »
I have to damit that the source is not well commented.

It's damnit ;-)

9
Code and examples / Re: Text search
« on: 12. May 2018, 12:46:50 »
The * is a JOKER (Peter Verhas's term) for anything before or after prince. WILDCARD is replacement for the JOKER character if it * is part of the search text.

Interesting. So farr[idx] LIKE "*PrInCe*" should find (as demonstrated by your results):
[062993] looked at the princess. She still sat motionless with a look of
[062999] "Good-by, Princess!" said he.
[063350] same scale as under the old prince.
[063402] Ivanovich, the late prince's architect, who was living on in
[063649] when she and Countess Mary spoke of Prince Andrew (she never mentioned

... but not:
[63018] Princess Mary gazed intently into his eyes with her own luminous
[63032] princess had caught a glimpse of the man she had known and loved,
[64282] Nicholas and Natasha always brought him back to the health of Prince
[64909] right, and let there be but one banner- that of active virtue.' Prince
[65024] Prince Andrew- and his father had neither shape nor form, but he
[65031] Prince Andrew in the house, Nicholas never imagined him in human

Is that the intended use of LIKE "*PrInCe*"?

10
Code and examples / Re: Text search
« on: 10. May 2018, 19:43:15 »
I wonder, though, what happened to the matches marked with ** above.

11
Code and examples / Re: Text search
« on: 10. May 2018, 02:40:27 »
7312 Ás to find 2776 matches with the Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
Code: [Select]
[62993] looked at the princess. She still sat motionless with a look of
[62999] "Good-by, Princess!" said he.
[63012] "Yes, Princess," said Nicholas at last with a sad smile, "it doesn't
**[63018] Princess Mary gazed intently into his eyes with her own luminous
**[63032] princess had caught a glimpse of the man she had known and loved,
[63042] why. "Thank you, Princess," he added softly. "Sometimes it is hard."
[63044] "So that's why! That's why!" a voice whispered in Princess Mary's
[63065] "Princess, for God's sake!" he exclaimed, trying to stop her.
[63066] "Princess!"
[63079] In the winter of 1813 Nicholas married Princess Mary and moved to
[63313] and Sonya, blaming himself and commending her. He had asked Princess
[63350] same scale as under the old prince.
[63402] Ivanovich, the late prince's architect, who was living on in
[63649] when she and Countess Mary spoke of Prince Andrew (she never mentioned
[63650] him to her husband, who she imagined was jealous of Prince Andrew's
[63837] Rostovs he had received a letter from Prince Theodore, asking him to
[63962] "And have you talked everything well over with Prince Theodore?" she
[63968] he did frighten me... You've seen the princess? Is it true she's in
[64250] questions as to whether Prince Vasili had aged and whether Countess
**[64282] Nicholas and Natasha always brought him back to the health of Prince
[64297] translate things into his mother's language, "Prince Alexander
[64305] "Well, and how is Prince Alexander to blame? He is a most
[64422] Prince Theodore, and she helped him by asking how his affairs with
[64423] Prince Theodore had gone.
[64479] his brows. "Prince Theodore and all those. To encourage culture and
**[64909] right, and let there be but one banner- that of active virtue.' Prince
**[65024] Prince Andrew- and his father had neither shape nor form, but he
**[65031] Prince Andrew in the house, Nicholas never imagined him in human

12
Code and examples / Re: Text search
« on: 01. May 2018, 19:33:19 »
If there were any Crown-Princes/Princesses in the text, they would also be counted in.

OK, no problem - first version is restricted to case-sensitive full word, second one is "root":
Code: [Select]
include \masm32\MasmBasic\MasmBasic.inc
  Init
  Dim match$() ; for the results
  Recall "War and Peace.txt", wp$()

  NanoTimer()
  For_ ct=0 To wp$(?)-1
.if Instr_(wp$(ct), "Prince", 4) ; case-sensitive, full word (no prince, no Princess...)
Let match$(esi)=Str$("[%000i]\t", ct)+wp$(ct)
inc esi
.endif
  Next
  PrintLine NanoTimer$(), Str$(" to find %i matches with the ", esi), Cpu$()
  For_ ct=match$(?)-15 To match$(?)-1
PrintLine match$(ct)
  Next

  NanoTimer()
  xor esi, esi
  For_ ct=0 To wp$(?)-1
.if Instr_(wp$(ct), "prince", 1) ; case-insensitive (prince, Prince, Princess...)
Let match$(esi)=Str$("[%000i]\t", ct)+wp$(ct)
inc esi
.endif
  Next
  PrintLine CrLf$, NanoTimer$(), Str$(" to find %i matches with the ", esi), Cpu$()
  For_ ct=match$(?)-15 To match$(?)-1
PrintLine match$(ct)
  Next
EndOfCode
Code: [Select]
5211 Ás to find 1559 matches with the Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
[60565] from it, the death of Prince Andrew, Natasha's despair, Petya's death,
[61426] Prince Andrew (she never mentioned him to her husband, who she imagined
[61427] was jealous of Prince Andrew's memory), or on the rare occasions when
[61605] he had received a letter from Prince Theodore, asking him to come to
[61722] "And have you talked everything well over with Prince Theodore?" she
[61996] habit, and Pierre answered the countess' questions as to whether Prince
[62028] health of Prince Ivan and Countess Mary Alexeevna.
[62042] things into his mother's language, "Prince Alexander Golitsyn has
[62049] "Well, and how is Prince Alexander to blame? He is a most estimable man.
[62162] which he had gone to Petersburg to consult with his new friend Prince
[62163] Theodore, and she helped him by asking how his affairs with Prince
[62217] brows. "Prince Theodore and all those. To encourage culture and
[62624] one banner--that of active virtue.' Prince Sergey is a fine fellow and
[62734] Prince Andrew--and his father had neither shape nor form, but he
[62740] "My father!" he thought. (Though there were two good portraits of Prince

6095 Ás to find 2770 matches with the Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
[61426] Prince Andrew (she never mentioned him to her husband, who she imagined
[61427] was jealous of Prince Andrew's memory), or on the rare occasions when
[61605] he had received a letter from Prince Theodore, asking him to come to
[61722] "And have you talked everything well over with Prince Theodore?" she
[61728] frighten me... You've seen the princess? Is it true she's in love with
[61996] habit, and Pierre answered the countess' questions as to whether Prince
[62028] health of Prince Ivan and Countess Mary Alexeevna.
[62042] things into his mother's language, "Prince Alexander Golitsyn has
[62049] "Well, and how is Prince Alexander to blame? He is a most estimable man.
[62162] which he had gone to Petersburg to consult with his new friend Prince
[62163] Theodore, and she helped him by asking how his affairs with Prince
[62217] brows. "Prince Theodore and all those. To encourage culture and
[62624] one banner--that of active virtue.' Prince Sergey is a fine fellow and
[62734] Prince Andrew--and his father had neither shape nor form, but he
[62740] "My father!" he thought. (Though there were two good portraits of Prince

Results do not match nicely what I see above; apparently, there are different versions of W+P around.

13
Code and examples / Re: Text search
« on: 01. May 2018, 18:44:46 »
include \masm32\MasmBasic\MasmBasic.inc         ; download
  Init
  NanoTimer()
  Open "O", #1, "results.txt"
  Recall "War and Peace.txt", wp$()
  For_ ct=0 To wp$(?)-1
        .if Instr_(wp$(ct), "Prince", 4)        ; case-sensitive, full word (no prince, no Princess...)
                PrintLine #1, Str$("[%000i\t]", ct), wp$(ct)
        .endif
  Next
  Inkey NanoTimer$()
EndOfCode


15ms, 1579 matches:
Code: [Select]
[62028] health of Prince Ivan and Countess Mary Alexeevna.
[62042] things into his mother's language, "Prince Alexander Golitsyn has
[62049] "Well, and how is Prince Alexander to blame? He is a most estimable man.
[62162] which he had gone to Petersburg to consult with his new friend Prince
[62163] Theodore, and she helped him by asking how his affairs with Prince
[62217] brows. "Prince Theodore and all those. To encourage culture and
[62624] one banner--that of active virtue.' Prince Sergey is a fine fellow and
[62734] Prince Andrew--and his father had neither shape nor form, but he
[62740] "My father!" he thought. (Though there were two good portraits of Prince

14
Code and examples / Re: Steganography
« on: 01. March 2018, 01:05:31 »
Nice! For a serious implementation, one should use a lossless compression format, though, like PNG. Nobody sends uncompressed BMP files as attachments...

15
Code and examples / Re: Happy New Year 2018
« on: 02. January 2018, 18:53:56 »
Nice demo, B+!
Happy New Year to everybody :)

Pages: [1] 2 3 ... 10