Welcome, Guest. Please login or register.

Author Topic: NEED HELP FROM QBASIC GURUS!  (Read 3050 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline fatman2021Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2002
  • Posts: 118
    • Show only replies by fatman2021
    • http://www.geocities.com/fatman2021/
NEED HELP FROM QBASIC GURUS!
« on: January 27, 2003, 08:34:14 PM »
How do you plot a pixel using the OUT command in Qbasic? :-?  My gool is to have control of the pixel using the CRTC. The OUT command is also alot faster then  using call absolute... Also using DEF DEG = &HA000 and POKE will not work with all computers.
 

Offline iamaboringperson

  • Hero Member
  • *****
  • Join Date: Jun 2002
  • Posts: 5744
    • Show only replies by iamaboringperson
Re: NEED HELP FROM QBASIC GURUS!
« Reply #1 on: January 27, 2003, 08:40:25 PM »
QBASIC????
wtf? are you serious? you actually use that?

anyway...
OUT looks like its a command to output to the I/O map, not the memory map!
if its I/O & not memory, you will NOT be able to 'plot a pixel' with it!

 :-)
 

Offline alx

Re: NEED HELP FROM QBASIC GURUS!
« Reply #2 on: January 27, 2003, 08:48:36 PM »
Here is an extract from the QBasic help (sorry if the foruatting gets messed up):

INP returns a byte read from a hardware I/O port.
OUT sends a byte to a hardware I/O port.

INP(port%)
OUT port%, data%

    ■ port%     A number in the range 0 through 65,535 that identifies
                the port.
    ■ data%     A numeric expression in the range 0 through 255 to send
                to the port.

Example:
    x% = INP(&H3FC)          'Read COM1 Modem Control Register.
    OUT &H3FC, (x% XOR 1)    'Change Data Terminal Ready bit.

I think that the command that you want is "pset", which appears to work just like "plot" in most BASICS.

Out of interest, why QBasic?  I've never liked it (or AmigaBasic for that matter) :-)

Offline iamaboringperson

  • Hero Member
  • *****
  • Join Date: Jun 2002
  • Posts: 5744
    • Show only replies by iamaboringperson
Re: NEED HELP FROM QBASIC GURUS!
« Reply #3 on: January 27, 2003, 08:54:23 PM »
Quote
Out of interest, why QBasic? I've never liked it (or AmigaBasic for that matter)

thats right! i want to know also!! :-)

amigabasic was absolute ####!
qbasic was muchbetter(especialy the UI)

but you would do better with C or C++ IMO
 

Offline fatman2021Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2002
  • Posts: 118
    • Show only replies by fatman2021
    • http://www.geocities.com/fatman2021/
Re: NEED HELP FROM QBASIC GURUS!
« Reply #4 on: January 27, 2003, 08:55:37 PM »
PSET will not work in svga graphics modes.
I use QBASIC becuse I can download for free from Microsofts webpage as part of olddos.zip and I can program large programs in a short amout of time. The code also make great programming docs.
 

Offline iamaboringperson

  • Hero Member
  • *****
  • Join Date: Jun 2002
  • Posts: 5744
    • Show only replies by iamaboringperson
Re: NEED HELP FROM QBASIC GURUS!
« Reply #5 on: January 27, 2003, 09:00:36 PM »
@fatman2021
no disrespect, dude,

you can also get GCC for free!
and produce much better programs, that will work on the amiga aswell!

if not, dont give up programming though....
 

Offline alx

Re: NEED HELP FROM QBASIC GURUS!
« Reply #6 on: January 27, 2003, 09:03:01 PM »
Don't think I've ever used SVGA in Qbasic - perhaps the forums here and here could help?

---------

Yeah - my first square :-D

Offline iamaboringperson

  • Hero Member
  • *****
  • Join Date: Jun 2002
  • Posts: 5744
    • Show only replies by iamaboringperson
Re: NEED HELP FROM QBASIC GURUS!
« Reply #7 on: January 27, 2003, 09:09:22 PM »
QBASIC.COM.....
 :roflmao:
all i got were a whole bunch of porno popups & a message telling me 'this domain name is for sale'
 ;-)
actually, a joke, i can hear the tumbleweed....  ;-)
 

Offline alx

Re: NEED HELP FROM QBASIC GURUS!
« Reply #8 on: January 27, 2003, 09:14:34 PM »
I'm kinda surprised that M$ still haven't haven't renamed it "qbasic.net" and started charging loads for it :-)

Offline JetFireDX

  • Full Member
  • ***
  • Join Date: Feb 2002
  • Posts: 232
    • Show only replies by JetFireDX
Re: NEED HELP FROM QBASIC GURUS!
« Reply #9 on: January 27, 2003, 09:27:11 PM »
I actually wouldn't mind a "real" basic rather than VB.net from MS. I just finished a class on VB 6 and tried to migrate to VB.net...it's insane what they changed! (I was supposed to be in a C/C++ class, but it was cancelled)
 

Offline jdiffend

  • Sr. Member
  • ****
  • Join Date: Apr 2002
  • Posts: 302
    • Show only replies by jdiffend
Re: NEED HELP FROM QBASIC GURUS!
« Reply #10 on: January 28, 2003, 01:52:04 AM »
Quote

I actually wouldn't mind a "real" basic rather than VB.net from MS. I just finished a class on VB 6 and tried to migrate to VB.net...it's insane what they changed! (I was supposed to be in a C/C++ class, but it was cancelled)


Basic sucks!  I don't even want to think about VB.net!

I've worked on several VB or other basic projects.  I tried to get them to use C/C++ or Java but they never listen!

I used to work with a group of miggy programmers that wanted to use compiled basic for commercial apps.  Why?  One had used QuickBasic and didn't want to learn C.  I wrote the low level code to load pictures, cycle colors, load sounds, play sounds, move mouse pointers... you name it.  My sample apps were tiny, fast, and pretty simple really.  The commercial programs were big, slow and unprofessional looking.  It was the best use of basic I've seen by far but still nothing close to what was possible in C/C++.

One they refused to go to C++ because of how long they had spent on the GUI in VB and they said it would take too long to port and would end up buggy because "C++ is more difficult to program in".  I stayed late one evening and built 90% of it over in C++.  I showed it to them and they just came up with other lame excuses.  The VB app had bugs related to plug-ins and the VB compiler itself.  An external data migration tool written in VB took hours to run and it was supposed to run EVERY NIGHT!  NO WAY!   I ported the data migration tool to C++ in a couple hours, it took less than 5 minutes to run and it performed data verification the VB app didn't!  Too bad the data was allways bad... you know why?  It ported data from the mainframe running... Pick Basic which kept corrupting the data tree!
 
Another project I tried to get people to use C++ on involved a VB GUI and a C++ DLL with the database / business logic code.  All C++ code was done within a couple days (usually a couple hours) after mod requests while it took forever to work out bugs in the VB.  Some code worked under one version of the compiler and not another... so guess what version was used to build the releases?  The buggy version!  Oh yeah, and another buggy VB plug-in.  We could have done the job with HALF the people and less bugs if it had all been C++.

The last project was for a SAN designer/simulator for a network switch manufacturer.  It involved a VB GUI to design a network visually and a Java app to build the data files for the company's switch simulators (used serialized Java obects to store the info... best example of how not to do something I've ever seen).  Getting VB to generate a simple text file with the SAN info made the programmer jump through hoops!  The Java code dealing with it took a less than two days.  Extracting the code from the switch simulators (different for ever switch type) was another matter but still only took 3 days.  The VB still had bugs at delivery.

My Windows pop-up killer was written in VB.  Guess what happens when you run out of memory.  CRASH!  Typical of every VB app I've seen.

VB SUCKS!  Pick Basic sucks!  Oh hell... BASIC SUCKS!
 :-x
 

Offline Nick

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 1189
    • Show only replies by Nick
Re: NEED HELP FROM QBASIC GURUS!
« Reply #11 on: January 28, 2003, 12:14:54 PM »
Oh I can`t remember how to plot a pixel. I remember doing that years ago. I think I did anyway. Its
not that difficult I`m sure. About screen modes. I seem to remember its just "Screen #". Screen 12 I
think was a really low resolution. Sorry i`m not much help anymore. QBASIC was my first language.
Loved it for some reason. Just look around the online help. Its there somewhere I`m sure. I seem to
remember it can be difficult to navigate at times.

@jdiffend

Yeah BASIC isn`t for the professional, but how many people program in BASIC as their first
programming language? Also BASIC can be used to create some simple programs as good as any
other language. I mean simple programs. Nothing complicated. In some cases like that, BASIC
is perfect. Quick and easy.

Only when you want a GUI, speed, moderate to advanced features, is C/C++ better. I`ve used quite a few
languages, but unfortunately BASIC and OPL on my PSION are the only two I`ve used a decent amount. I
don`t have the patience for C and especially C++.

PS keep away from COBOL if you want to keep your hair!
PPS KILL JAVA!
 

Offline fatman2021Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2002
  • Posts: 118
    • Show only replies by fatman2021
    • http://www.geocities.com/fatman2021/
Re: NEED HELP FROM QBASIC GURUS!
« Reply #12 on: January 28, 2003, 08:00:28 PM »
03C0h/03C1h = Attribute controller
03C3h = Video Subsystem Enable Register
03C4h = Sequencer
03C6h = PEL Mask (although I tihnk PEL stands for Pixel or Palette, so I dunno...)
03C7h = for Read is the DAC State Register, for Write is PEL Address Read Mode
03C8h = PEL Address Write Mode
03C9h = PEL Data Register
03CAh = for Read is the Feature Control Register, for Write is Graphics 2 Position (sometihng for EGA, Idunno what it means)...
03CEh = the Graphics controller
03D4h = CRTC
03DAh = for Read is input status #1 register and for Write the feature conrol register, similar to 03CAh

 

Offline iamaboringperson

  • Hero Member
  • *****
  • Join Date: Jun 2002
  • Posts: 5744
    • Show only replies by iamaboringperson
Re: NEED HELP FROM QBASIC GURUS!
« Reply #13 on: January 29, 2003, 09:30:14 PM »
Quote

fatman2021 wrote:
03C0h/03C1h = Attribute controller
03C3h = Video Subsystem Enable Register
03C4h = Sequencer
03C6h = PEL Mask (although I tihnk PEL stands for Pixel or Palette, so I dunno...)
03C7h = for Read is the DAC State Register, for Write is PEL Address Read Mode
03C8h = PEL Address Write Mode
03C9h = PEL Data Register
03CAh = for Read is the Feature Control Register, for Write is Graphics 2 Position (sometihng for EGA, Idunno what it means)...
03CEh = the Graphics controller
03D4h = CRTC
03DAh = for Read is input status #1 register and for Write the feature conrol register, similar to 03CAh


yes, thats all well and good.... but you CANT use those IO registers to draw graphics!! to set screenmodes, perhaps(?)... but not plot pixels!!!
 

Offline asian1

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1359
    • Show only replies by asian1
Re: NEED HELP FROM QBASIC GURUS!
« Reply #14 on: January 29, 2003, 10:59:22 PM »
VESA & QBASIC

Perhaps you can use VESA for programming SVGA card using QBasic. Another interesting approach is using an "assembly language" routine / module.

QBasic Tutorial