Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by logiclrd

  1. logiclrd

    Offsets, segments, and buffering

    This is an area where many people have done a lot of work, but it requires an intimate knowledge of a number of things. First of all, a knowledge of pointers in C++ only partially helps, because memory addresses in QuickBASIC are segmented (read this FAQ for more information: faq314-290...
  2. logiclrd

    Padding A String With Zeroes

    Here's the approach I take, by the way. It is conceptually a bit cleaner than repeatedly adding to a string. padded$ = RIGHT$("000000" + LTRIM$(STR$(number%)), 7) Of course this only works with positive numbers.
  3. logiclrd

    Sorting an array

    Here is some information on the QuickSort, in case anybody is still a bit confused: faq314-336 "What is the Quick Sort, and how fast is it, really?"
  4. logiclrd

    Assembly SUB Tool

    Hehe, you were told to avoid 2000? Whoever recommended that to you was misinformed :-) Windows 2000 is the most stable of the mainstream Windows line yet released. It lacks a few of the features of XP, but in part that is what actually makes it stable. Also, 2000 is faster than XP -- in some...
  5. logiclrd

    going back to the main prog. from sub

    SEWill, I think what you need to see is that SUBs automatically return to the place from which they were called, as soon as QB reaches the end of the subroutine. Here is a simple example: DECLARE SUB test () PRINT "a" test PRINT "c" SUB test PRINT "b" END SUB...
  6. logiclrd

    Mouse for a Tablet? And different cursors?

    mgh730, What you need to do is wrap up the routines to draw the mouse cursor inside SUBs. Then, you can maintain two versions of the cursor, one in PUT format and one in a simple array that's easy for you to access (or you could even figure out how to read it directly from the PUT array -- in...
  7. logiclrd

    Ideas for making a maze.

    A conceptually easier way to make a maze is to maintain a list in addition to the maze being made: a list of all squares that are not currently in the maze but which are ADJACENT to the maze. Think of it this way: the maze is originally empty and you have a grid full of squares that are not...
  8. logiclrd

    EMS

    But because it's not object-oriented, it doesn't run itself. You can't just add a bunch of controls to a form. You can't just ask an object to draw itself. Building up forms dynamically is difficult and requires container structures outside of the parent object, etc. It is my belief that any...
  9. logiclrd

    QBasic, PEEK and POKE

    PEEK and POKE are for accessing memory directly. On very old systems, like the VIC20, TRS-80, Z80, etc., hardware access was achieved by accessing memory at special locations. The memory access would then be intercepted and translated into a hardware command. This is still done to a much more...
  10. logiclrd

    mode x

    Mode X is a slang name for a VGA hack that achieves 320x240 in 8-bit colour with square pixels. I recommend you read up on it in Michael Abrash's Black Book, he explains all the VGA options very well. It's a much more difficult mode to work with compared with mode 13h (SCREEN 13), though...
  11. logiclrd

    EMS

    An NT class Windows will not crash at all, and in all likelihood if you misplace a pointer while running under Windows 9x, you will simply crash another program that is running. You could also crash the system, but it would not be permanent (you could just reboot). The chance of actually...
  12. logiclrd

    Call Absolute in QBasic 1.1 <-> writing assembly

    The preferred method for calling assembler functions from QB is to make a separate assembler module, assemble it to its own OBJ file using an assembler like MASM or TASM, then link the OBJ file into the project. You can then use a DECLARE statement to specify parameters, calling convention and...
  13. logiclrd

    Reading another process's memory

    The following thread revisited a previous question I answered a long time ago in the QBasic programming forum: thread314-395032 The issue at hand is reading (and possibly writing) the memory of a process given only its process ID. I asked around when the question was originally asked and was...
  14. logiclrd

    dim vscreen(640,480)

    I know all about it, actually I've read Abrash's Black Book, but QB can't properly take advantage of most of those tricks. Anyway, as far as I am concerned, the art of realtime graphics is somewhat lost now that we have 3D accelerators to take care of it for us. Not that it's trivial to do with...
  15. logiclrd

    dim vscreen(640,480)

    I know all about it, actually I've read Abrash's Black Book, but QB can't properly take advantage of most of those tricks. Anyway, as far as I am concerned, the art of realtime graphics is somewhat lost now that we have 3D accelerators to take care of it for us. Not that it's trivial to do with...

Part and Inventory Search

Back
Top