News:

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

Main Menu

Recent posts

#41
MASM64 SDK / Re: lpCustColors element in CH...
Last post by caoenze - May 21, 2024, 03:55:56 AM
This ChooseColor API troubled me for a day, and I finally found the answer. It turns out it was a data structure issue. Thank you very much! :thumbsup:  :thumbsup:  :thumbsup:
#42
CoderStudio / Re: Listing the exports of a D...
Last post by sudoku - May 21, 2024, 03:41:49 AM
Quote from: alCoPaUL on May 21, 2024, 03:40:19 AMaka companion virus technique or redirect or the primacy of .com over .exe..
:dazzled:  What are you even talking about?
#43
CoderStudio / Re: Listing the exports of a D...
Last post by alCoPaUL - May 21, 2024, 03:40:19 AM
aka companion virus technique or redirect or the primacy of .com over .exe..
#44
MasmBasic & the RichMasm IDE / Re: Silly question
Last post by daydreamer - May 20, 2024, 11:54:37 PM
I agree on annoying spaghetti code,gosub 2000 for example but compiled its might instead hidden on different call memory address 2000 instead
Small text has pre computer solution : reading glasses,but if you are lucky someone has scanned in all old computer magazines that had basic code as PDF
Edit
I don't know if archived compute magazine have any basic game of interest ?
Copy and paste code simpler than tedious type in basic code in editor ?
#45
MasmBasic & the RichMasm IDE / Re: Silly question
Last post by jj2007 - May 20, 2024, 11:14:30 PM
Quote from: FORTRANS on May 20, 2024, 10:27:06 PMWell, that book has seventy to eighty odd more of the same ilk.

It was actually a short period before structured BASIC arrived, but long enough to destroy BASIC's reputation forever.
#46
MasmBasic & the RichMasm IDE / Re: Silly question
Last post by FORTRANS - May 20, 2024, 10:27:06 PM
Hi Jochen,

Quote from: jj2007 on May 20, 2024, 08:18:43 AMI must say that the *.bas code is a really ugly example of spaghetti code - it hurts the eye.

   Well, that book has seventy to eighty odd more of the same ilk.
Not to mention using rather small text.  That hurts my eyes.

Cheers,

Steve
#47
16 bit DOS Programming / Re: Line Drawing
Last post by FORTRANS - May 20, 2024, 10:19:28 PM
Hi Tim,

Quote from: tda0626 on May 20, 2024, 07:18:05 AMIn any case, I think my next step is to treat each quadrant in its own routine and to get that working.

   The last time I tried coding a general purpose line drawing routine,
I wrote code for the four quadrants, horizontal lines, vertical lines,
and the two diagonal lines.  Those last four could be coded up rather
easily, and could be faster than a general purpose line drawing routine.

Regards,

Steve

Edit:   With the four special case lines, it should be eight octants, not
four quadrants.

SRN
#48
CoderStudio / Re: Listing the exports of a D...
Last post by greenozon - May 20, 2024, 06:12:54 PM
 hMod = LoadLibrary("kernel32.dll");


this statement might return NULL
so not checking for this might hard hit the app...
just in case :)

PS I know the chance of getting NULL is 0.0001% but who knows
#49
MasmBasic & the RichMasm IDE / BASIC: ON someval GOTO line100...
Last post by jj2007 - May 20, 2024, 09:58:56 AM
Just for fun, and inspired by Steve's GW-BASIC thread, I made two new macros mimicking BASIC's ON someval GOTO 100, 200, 300 command (ecx is the index):

.code
p0:
  deb 4, "P0", eax
  retn
p1:
  deb 4, "P1", eax
  retn
...
g0:
  deb 4, "G0", eax
  jmp @back
g1:
  deb 4, "G1", eax
  jmp @back
...

  For_ ecx=0 To 2
    lea eax, [ecx+100]        ; pass a value in eax
    OnIndexCall ecx, p0, p1, p2
  Next
  For_ ecx=0 To 2
    lea eax, [ecx+1000]        ; pass a value in eax
    OnIndexGoto ecx, g0, g1, g2
    @back:
  Next

Output:
P0      eax             100
P1      eax             101
P2      eax             102
G0      eax             1000
G1      eax             1001
G2      eax             1002

Source attached. ON ... GOTO ... is not the most beautiful command, but it can actually be handy.
#50
The Campus / Re: GLOBAL Structure
Last post by sudoku - May 20, 2024, 09:55:00 AM