Search found 1226 matches

by dafhi
Nov 01, 2005 6:45
Forum: Tips and Tricks
Topic: ShowBits64
Replies: 8
Views: 3952

asm (updated) was the only way i knew how to do this problem. also made this one based on counting_pine and Sisophon's input. for my own personal use i've kept the nice short one by mjs. thanks guys. Sub ShowBits_FAST( byval value as integer ) dim as uinteger I, J, strPos, bitPos, AryFG(...
by dafhi
Oct 31, 2005 13:09
Forum: Tips and Tricks
Topic: ShowBits64
Replies: 8
Views: 3952

ShowBits64

ShowBits64 Sub ShowBits32( p as any ptr, Newline As boolean = true) '' init gfx or u will see wrong color '' use ScreenRes x,y, 32 Dim As ulong I, AryFG(3), AryBG(3) var oldcol = color() AryFG(0) = RGB(200,200,200) AryFG(1) = RGB(255,0,0) AryFG(2) = RGB(0,255,0) AryFG(3) = RGB(0,96,255) AryBG(0) = R...
by dafhi
Jun 17, 2005 14:01
Forum: Windows
Topic: 90 megs of libs
Replies: 4
Views: 3543

weird. i must have installed too many times.
by dafhi
Jun 17, 2005 7:01
Forum: Windows
Topic: 90 megs of libs
Replies: 4
Views: 3543

90 megs of libs

is all that hard drive space for 'look up tables' really necessary?
by dafhi
Jun 13, 2005 11:49
Forum: Beginners
Topic: TinyPTC
Replies: 10
Views: 5237

This is what ByRef does:

Code: Select all

Dim Shared mMyInt = 0 'access var everywhere within document

Sub mMyInt_Add2(ByRef pInt)
  pInt = pInt + 1     'I prefix parameter names with a "p"
  mMyInt = mMyInt + 1
End Sub

mMyInt_Add2 mMyInt
Print mMyInt

Sleep
by dafhi
Jun 05, 2005 12:39
Forum: Beginners
Topic: asm q / suggestion
Replies: 15
Views: 8175

Ah, cool. my reasoning for getting rid of the brackets was, in basic, pracitally any project is built out of names that don't use [] :D
by dafhi
Jun 05, 2005 10:49
Forum: Beginners
Topic: asm q / suggestion
Replies: 15
Views: 8175

interesting. first time i've heard of gnu asm.

perhaps there could be a switch like
Option I_Am_a_BASIC_Head
by dafhi
Jun 05, 2005 7:56
Forum: Beginners
Topic: some questions
Replies: 7
Views: 4129

Actually, Dim Shared sounds more like a 'modular' specification than a global one. Modular variables can be accessed by any routine within the same .bas file (module). Global variables can be accessed by any module under one project.
by dafhi
Jun 05, 2005 7:44
Forum: Beginners
Topic: asm q / suggestion
Replies: 15
Views: 8175

asm q / suggestion

is it feasible to not have to type

ASM
End ASM

and change the syntax so that

Mov [varname], eax 'does the same as
Mov varname, eax

Mov @varname, eax 'and _something like this_ will write to the memory address
by dafhi
Jun 04, 2005 10:37
Forum: Beginners
Topic: asm crashes
Replies: 4
Views: 3367

ah ... okay, i think. i'm a vb-er and saw this example but [Function] instead of [AddFive] was used. Took me at least 15 minutes to figure that one out. Anyway, I'll have a look. Thanks.
by dafhi
Jun 04, 2005 10:26
Forum: Beginners
Topic: asm crashes
Replies: 4
Views: 3367

asm crashes

Code: Select all

FUNCTION AddFive(num AS INTEGER) AS INTEGER
ASM
    mov eax, [num]
    add eax, 5
    mov [AddFive], eax
END ASM
END FUNCTION

DIM i AS INTEGER = 4

PRINT "4 + 5 = "; AddFive(i)

sleep

Go to advanced search