Search found 75 matches

by Michael Calkins
Sun Sep 04, 2005 12:24 am
Forum: QBASIC and QB64 Questions & Answers
Topic: formula for percent
Replies: 39
Views: 42730

I am 18 (almost 19)
I started using computers and MS-DOS when about 7. I started using QBASIC when about 9, I think. I started using assembly off and on less than a year ago.
Regards,
Michael
by Michael Calkins
Tue Aug 30, 2005 1:58 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: No black behind text
Replies: 11
Views: 12488

A demo: 'Written by Michael Calkins SCREEN 13 DEFINT A-Z 'We use INTEGERs around these parts... DIM SHARED text(0 TO 33, 32 TO 127, 0 TO 1) COLOR 15 'write and GET text: FOR i = 32 TO 127 PRINT CHR$(i); y = ((i - 32) \ 40) * 8 x = ((i - 32) MOD 40) * 8 GET (x, y)-(x + 7, y + 7), text(0, i, 0) NEXT i...
by Michael Calkins
Tue Aug 30, 2005 1:00 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: No black behind text
Replies: 11
Views: 12488

There is a simple option: defint a-z red=? green=? blue=? PALETTE 0,red+green*&h100+blue*&h10000 which changes attribute 0 to whatever color you want. red, green, and blue should be values from &h0 to &h3f. Alternately, you could write a font routine than used PUT to draw your text. ...
by Michael Calkins
Tue Aug 30, 2005 4:33 am
Forum: QBASIC and QB64 Questions & Answers
Topic: Need as many quick answers as I can get!
Replies: 12
Views: 13641

I should have mentioned this earlier. PCOPY is a way of copying the contents of one video memory page to another. In screen mode 0, most people will have 8 video memory pages. So you can use PCOPY 0,1 to save your screen before drawing the menu, and PCOPY 1,0 to restore it after you are done. Also, ...
by Michael Calkins
Mon Aug 29, 2005 5:28 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Need as many quick answers as I can get!
Replies: 12
Views: 13641

I need 2 reserved numbers for background/foreground, and then a random amount of variables available for use as ASCII codes. I am not getting what this has to do with PEEK and POKE. You could do something like: DIM foreground AS INTEGER DIM background AS INTEGER DIM ASCII(0 to (80*43)-1) AS STRING ...
by Michael Calkins
Sat Aug 27, 2005 8:01 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Need as many quick answers as I can get!
Replies: 12
Views: 13641

Still not sure exactly what you are asking...

what I need to do is be able to put about 40 sets of 2 numbers in memory... INTEGERs? LONGs? BYTEs? Where in memeory? The video memory? Some QBASIC array? If you mean copying 1 array to another very quickly, you could use a machine code routine to do it faster than interpreted QBASIC. Semi-Graphica...
by Michael Calkins
Sat Aug 27, 2005 12:59 am
Forum: QBASIC and QB64 Questions & Answers
Topic: Need as many quick answers as I can get!
Replies: 12
Views: 13641

more info, just in case

just in case 16 bit code gets more than 64 KB by segmenting. Each segment is 64KB big. Segments overlap every 16 bytes. (16 bytes=1 paragraph). That meanse you can have segments 0000h to FFFFh and offsets from 0000h to FFFFh. The <b>actual</b> address is the segment * 16 + the offset. (this means 20...
by Michael Calkins
Fri Aug 26, 2005 4:46 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: input time delay
Replies: 4
Views: 5598

You might put this inside the loop:

IF starttime! > t! THEN
'crossed midnight, timer went to 0
starttime! = starttime! - 86400
END IF

Regards,
Michael
by Michael Calkins
Fri Aug 26, 2005 4:32 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Need as many quick answers as I can get!
Replies: 12
Views: 13641

Re: Need as many quick answers as I can get!

I am refering to questions #1 and #2. PEEK reads a byte of memory POKE writes a byte of memory DEF SEG sets what segment will be used by PEEK and POKE Regards, Michael DEFINT A-Z DEF FNhexw$ (n) temp$ = HEX$(n) FNhexw$ = STRING$(2 - LEN(temp$), "0") + temp$ END DEF RANDOMIZE TIMER DO COLOR...
by Michael Calkins
Mon May 09, 2005 11:52 am
Forum: QBASIC and QB64 Questions & Answers
Topic: LineNames in SUB
Replies: 5
Views: 9672

The
GOTO ChangeColor
seemed to work for me. I don't know why it wouldn't work for you. You can use GOSUB also.
Regards,
Michael
by Michael Calkins
Tue Apr 26, 2005 12:21 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Need serious help
Replies: 2
Views: 5995

To change directory: CHDIR or SHELL "CD\"+dirname$ To run a small game: SHELL doscommand$ To run a large game, here is how I would do it: Use a BAT file to run your QBASIC program. Something like this: @echo off :loop if exist temp.bat del temp.bat c:\dos\qbasic.exe /run myprog.bas if exis...
by Michael Calkins
Tue Apr 26, 2005 12:12 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: BATCH FILES
Replies: 2
Views: 5188

MS-DOS Help

by Michael Calkins
Mon Apr 25, 2005 10:53 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: MIDI FILES
Replies: 2
Views: 5374

Yes, it is possible. I've done it.

I know this is several months late, but I haven't been here that long and don't come here very often. Do searches for things like "General MIDI file format" URL: http://www.borg.com/~jglatt/tech/midifile.htm URL: http://www.midi.org/about-midi/table1.shtml If you are interested in seeing a...
by Michael Calkins
Thu Apr 07, 2005 11:49 am
Forum: QBASIC and QB64 Questions & Answers
Topic: creating short icon in windows for qb programms $ code hidin
Replies: 3
Views: 6612

SYSTEM

P.S.
Also use the SYSTEM statement to end your program, instead of END.
by Michael Calkins
Thu Apr 07, 2005 11:47 am
Forum: QBASIC and QB64 Questions & Answers
Topic: creating short icon in windows for qb programms $ code hidin
Replies: 3
Views: 6612

Shortcut

You want a shortcut (PIF). Do you also want a batch file? Is so, point your shortcut to the BAT file, otherwise, point your shortcut at QBASIC.EXE. Either way, you probably want to use the /run switch. sample batch program: @echo off c:\qbasic\qbasic.exe /run c:\mydir\myprog.bas Or, the command line...