QB64.Net Homepage QB/QB64 Keywords QB Graphics Forum Homework Policy
full screen with qb64 on windows 7by (no login)
how do you get to full screen with qb64 with windows 7
* Alt + Enter keyboard combination doesn't work?by Ben (no login)
Full screen is NOT supported by Vista or Windows 7.by Solitaire (no login)
I don't know about QB64 on Vista or Windows 7, since I'm still using Windows XP, which does support full screen mode. Old 16-bit software (such as QB) can go to full screen with Alt-Enter, but the newer OSs no longer support 16-bit software.
Maybe someone else can explain the technicalities behind it.
If you press Alt-Enter on Vista (or Windows 7) it will tell you "No Way" (in a lot more words than that). I think QB64 tries to emulate the old functions but inside the allowed window mode. I'm not sure if it currently supports the blinking text, as I described in a previous post. Check the QB64 sub-forum for more information.
Two ways...by (Login qb432l)
Either include at the top of your code, the command _FULLSCREEN, or when the program is running, press Alt+Enter. I have Windows 7 and know that either of these methods works fine.
Some monitors will reject the initial Alt+ Enter key press and display an "out of rage" message. If this is what you are experiencing, just wait until that message appears and press Alt + Enter again. It will then go to full screen. Unfortunately, the QB64 _FULLSCREEN command fails on these types of monitors.
The _FULLSCREEN function returns the present mode setting of the screen window.
full = FULLSCREEN
0 = _OFF (any non-0 value means fullscreen is on)
1 = _STRETCH
2 = _SQUAREPIXELS
Note: It cannot be assumed that calling _FULLSCREEN will succeed. It cannot be assumed that the type of full screen will match the requested one. So, always check the _FULLSCREEN function.
Warning: Despite your software, the user's hardware, drivers and monitor may not function in some modes. Thus, it is highly recommended that you manually confirm with the user whether the switch to full screen was successful. This can be done "quietly" in some cases by getting the user to click on a button on screen with their mouse or press an unusual key. If the user does not respond after about 8 seconds, switch them back to windowed mode.
Odd question perhaps, but it is Forum itself managed by QBasic code?by (Login QootyKev)
I am a bit 'deer-in-headlights' over the novel format of this messageboard, with its old tree-style threads and spartan appearance.
Was wondering if maybe the pages are generated by a QBasic program out of novelty?
* sorry, "is this forum", not "it is forum"by (Login QootyKev)
* ahh ok, thanks! i'm not afraid to try old thingsby (Login QootyKev)
*I believe it's either, "Them isn't fancy", or "Them aren't not fancy".by (Login qb432l)
*What an interesting idea...by (no login)
Arteleus put up a mock QBasic Forum based on a QB model, and before that, qbguy made one that used QB with CGI.
Took me several hours.
And there's no reason why a QB program *couldn't* generate a more modern-looking forum. But a QB64 forum, now that's an idea...
And it is pretty easy to generate the pages into HTLM and use HTML forms to send the posts back to the QB64 program to be processed. Security would be the trick. As much fun as it would be to set up a QB64 forum made with QB64, it wouldn't be worth the Notepad it's written on if it wasn't secure.
Anyway, imagination at work, and maybe something will come of this thread in the near future. I'll certainly be supportive of any and all ideas that lead to the eventual and successful merger of the QBasic Forum and the QB64 Forum; but all of us need to see how we feel about that concept.
All you need is someone experienced to keep an eye on the code, and regular off-site backups. That gives you enough security to make a successful attack quite unlikely, and the ability to recover from one. If worst comes to worst you could change web host, which you can't really do with Network54.
All the additions to a forum that involve registration, email notification, backups, etc., etc., etc., takes gobs and gobs of extra coding.
PS 1 gob = 1000 mob.
Vista and the first character of a SHELL "DIR reportby (Login QootyKev)
Regardless of what anyone says about Vista, I have numerous reports of people ABLE TO GET IT TO RUN my QBasic program. Many cannot, but some can. no DOSBox, no nuffin, just downloaded OLDDOS.EXE, probably AUTOEXEC.NT and ran QBASIC via a batch file.
Every now and then, though, I get this report. They can run it, all is smooth, until the program is checking for other files and/or directories on the drive.
The following code exists within one part of Qooty:
SHELL "dir *.* /b > temp.tmp"
FoundUtils% = 0
FoundData% = 0
FoundComments% = 0
OPEN "temp.tmp" FOR INPUT AS #1
WHILE EOF(1) = 0
LINE INPUT #1, dummy$
IF UCASE$(dummy$) = "UTILS" THEN FoundUtils% = 1
IF UCASE$(dummy$) = "DATA" THEN FoundData% = 1
IF UCASE$(dummy$) = "COMMENTS" THEN FoundComments% = 1
ThreeDirs% = FoundUtils% + FoundData% + FoundComments%
IF ThreeDirs% IF FoundComments% = 0 THEN ErrorMessage$ = "Program Files Missing (COMMENTS folder)."
IF FoundData% = 0 THEN ErrorMessage$ = "Program Files Missing (DATA folder)."
IF FoundUtils% = 0 THEN ErrorMessage$ = "Program Files Missing (UTILS folder)."
OPEN "ErrorLog.dat" FOR APPEND AS #1
PRINT #1, "Something's missing ..."
PRINT #1, "Comments folder count : "; FoundComments%
PRINT #1, "Data folder count : "; FoundData%
PRINT #1, "Utils folder count : "; FoundUtils%
The error message gives them the following :
Something's missing ...
Comments folder count : 0
Data folder count : 0
Utils folder count : 0
Contents of directory :
This log created 06-30-2010
Error type - Program Files Missing (UTILS folder).
They confirm that they haven't removed the first letter from all the files, but JUST LOOK AT IT!!! rofl
Every file name, and every extension, and every file name, has the first character removed! I keep looking for a scroll bar!
On top of that, its inserting query marks.
Has anyone seen this? Have they seen a solution?
I know the general rule is "well, Vista doesn't support it". But it supports it for some of these folks so far as any prog that doesn't require accessing other files.
But it still SUCKS!
Anyway, problems caused by M$ when they change operating systems include the command line DIR feature and the way it displays the data. 98 and XP are quite different, and I can't rmember the differences, it any, between XP and Vista. My point is that checking the file generated by the DIR SHELL would be the place to start your investigation.
A possible shortcut solution would be to try:
SHELL "cmd /c dir *.* /b > temp.tmp"
I have to admit your example looks weird, as if the SHELL dir is chopping off the first letter and replacing some parts of the returned files with wildcards. That I've never seen before.
If all else fails, you may need to write your own custom DIR function. It can be done with interrupts, and there is some stuff on the forum by Plasma, somewhere, that doea that; however, it too was made for pre-XP operating systems.
I suppose another solution would be to use error trapping instead of SHELL dir to see if those files you are hunting for exist.
Thanks Pete ... I just remembered where I'd seen it before ...by (Login QootyKev)
The first letter missing from the files and extensions was familiar to me.
I just remembered it happened when I attempted to run the same program on a Mac using DOSBox!
There's an oddity!
Thanks for your response! I have searched google all over and had just found the cmd /c which I have now asked a guinea pig with Vista to try. Someone, somewhere, says it can work! I'd never heard of cmd /anything until tonight ...
I didn't know there could be 32 or 64 bit Vistas ... can you give me a quick briefing on how someone can determine which bittage their Vista is?
And yeah, maybe I should employ better file exist checks I know there's better ones, you guys have shown me not too long ago :D
Of course, an easier way is to try to run QB. If it runs, it's 32-bit OS and if it fails, it is 64.
I think there are some Windows 7 / 32-OS systms in some netbooks, too. Anyway, the fact that 32-bit OS's are soon to be gone the way of the dinosaur is apparent, and this is way I recommend converting QB programs to QB64.
Thanks again, I'm gonna start compiling some demographics from the guinea pigsby (Login QootyKev)
I'll use that Microsoft link on 'em, thanks.
Running QB ... yeah, but there's people keep coming up with new ways to fail simple instructions, so I might get reports of QB not working when it actually would work fine had they not been fools.
Re QB64, yeah, I've tried it, but it doesn't like my program very much. Its taken me 18 years to get it where it is, and I don't fancy another 18 rewriting the whole sam hill thing
Will try every now and then, though.
Re: QB64 doesn't like my program much...by (Login qb432l)
How long ago did you try it? In its current release, it is virtually 100% compatible with QB code. Might be worth another look.
* About two or three months agoby (Login QootyKev)
*QB64 has been 99.99% QB compatible since January of this year. Might work now.by (Login qb432l)
* Thanks, I'll give it another burl!by (Login QootyKev)
Nah same dealby (Login QootyKev)
I still can't get QB64 to understand my program ... I think I am just too archaic.
32-bit Vista yay ... cmd /c fixed everything!by (Login QootyKev)
Fantastic, just worked out that my prog will work fine on Vista if a) its 32-bit (thanks Pete) and b) all my SHELL commands start with "cmd /c"
* "You're welcome" is correct.by Solitaire (no login)
*"You're" is correct, "weclome" is a know-no.by (Login qb432l)
OS$ = ENVIRON$("OS") ' OS$ can be DIM SHARED in main program if needed
IF LEN(OS$) THEN CMD$ = "CMD /C " ELSE CMD$ = "COMMAND /C "
SHELL CMD$ + "start /min notepad /p " + filename$ 'prints file
There's some stuff I'd never seen before!by (Login QootyKev)
Now, any idea what a few of these might look like?
Mine says Windows_NT
What would people with Vista (32- and 64-bit) get returned?
'You can use ENVIRON$ to find out a lot of things, like the PC username:
CLS : s = 1
COLOR 11: LOCATE 2, 27: PRINT "DOS Environment Variables": PRINT
DO WHILE ENVIRON$(s) <> ""
COLOR 14: PRINT s; ENVIRON$(s)
s = s + 1
IF s MOD 20 = 0 THEN
LOCATE 24, 25: PRINT "Press Any Key to continue!";
DO: SLEEP: LOOP UNTIL INKEY$ <> ""
COLOR 11: LOCATE 2, 27: PRINT "DOS Environment Variables": PRINT
COLOR 11: LOCATE 24, 2: PRINT "End of list! Press Any Key!"
DO: SLEEP: LOOP UNTIL INKEY$ <> ""
'You can use the value string names listed to pick which setting to return.
Prompt$ = ENVIRON$("PROMPT")
User$ = ENVIRON$("USERNAME")
Puter$ = ENVIRON$("COMPUTERNAME")
OpSys$ = ENVIRON$("OS")
Blaster$ = ENVIRON$("BLASTER")
COLOR 14: LOCATE 15, 25: PRINT "DOS Prompt = "; Prompt$
LOCATE 16, 25: PRINT " User Name = "; User$
LOCATE 17, 25: PRINT " Computer = "; Puter$
LOCATE 18, 25: PRINT "OS Version = "; OpSys$
LOCATE 19, 25: PRINT " Blaster = "; Blaster$
'I don't know what VISTA or 7 will return, but Win 9x return little.
Or you could use interrupt 21 like normal peopleby Ben (no login)
And forget about all this incompatibility and temporary files. And enjoy the speed increase and felxibility.
Look at example #3
Here I wrote a program for QBasic 1.1 based on this method.
Thanks Ben ... yikes though ...by (Login QootyKev)
Thanks very much Ben, interesting stuff, but unfortunately it looks wayyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy too complicated for me.
I will give it a try though.
Edit : Okay one example is what I currently do, and another one may not be TOO complicated for me (DIR$) ... I'll play around with it.
* Sorry, seemed relevant to me!by (Login QootyKev)
*Clippy, stop calling people names. It's not very nice. You should apologize.by Solitaire (no login)
to be honest, I think it was Ben's inferring I was "abnormaL" that prompted the postby (Login QootyKev)
I usually just assume something like that is what we call here sa "shitstir" :D ... but maybe Clippy thought he was being abusive.
* "pot stirring" ... haha, did you just make that up?by (Login QootyKev)
* One of my guinea pigs has finally respondedby (Login QootyKev)
His 32-bit Vista returned an environment of Windows_NT
So this renders ENVIRON$ useless for my purposes.
I want a way for my QBasic program to be able to tell whether someone is using Vista
QB on Vista will only work in text mode inside a window.by Solitaire (no login)
You cannot run in full screen mode.
You cannot run any screen other than Screen 0.
You cannot use blinking background colors -- it will only show up as a solid background to the text line.
I'm sure there are other restrictions -- and this is with the 32 bit version; 64 bits won't run at all.
I always forget the full sceen part, because I don't program graphics. Nice addition.
Full screen needed in text mode (SCREEN 0) even if you don't program graphics.by Solitaire (no login)
As I mentioned above, the blinking text (any color value between 16 - 31) doesn't work inside a window. Try the following in full screen, and again inside a window (Alt-Enter to toggle) to see the difference.
COLOR 25, 5
PRINT "Hello World"
COLOR 7, 0
full screen with qb64by (no login)
how do you get to full screen with qb64 with windows 7
Yeah, though that's all irrelevant to meby (Login QootyKev)
Sometimes the fullscreen can be inviting ... but screen modes and blinking colours don't come into it in my case.
Must be a pain for people who do graphics and weird stuff like that, though.
The pain of the artiste.
And please TheBOB, don't post as: Corpus Callosum and tell me "I'd post my opinion, but I don't want to get in the middle of this!"
*Right.by (Login qb432l)
There's this internet book on VGA and optimizing and stuffby Ben (no login)
I'm not sure if you've seen this one before, it got some good information. It is boring as hell to read, but it's a good reference.
I read that these two functions read and write directly to and from the given address, unlike PEEK and POKE, but what is the real difference? How does QB64 deal with the fact that the ports are not the same as they were, and can't be accessed the same way either? Also, how does QB64 handle OUT &H3C7? What did QBasic actually do when you did that? I don't understand how that prepares it to take input values. What hardware port is taking this color information?
QB64 emulates the ports, it doesn't directly access any hardware with OUTby Ben (no login)
PEEK & POKE read & write to memory. RAM. INP & OUT send signals to hardware ports, you know what I mean. Although, some hardware has its own memory and some hardware ports are memory mapped and what not. Hardware port &h3c7, &h3c8 and &h3c9 take the color information. These color ports are well documented here:
VGA has its own processor type thing which with its own logic does things like prepare ports for input based on what you tell it. Much like the CPU's activities based on the instructions you give it. I'm not expert on this stuff though, so all I said could be 100% wrong.
OUT &H3C8, 6 prepares the color port to be changed using OUT &H3C9, setting. RGB values 0 to 63. QB64 32 bit values 0 to 255.
&H3C7 prepares the color port to be read with INP. You can then read the RGB color settings.
OUT &H3C7, 6 'color attribute to read
red = INP(&H3C9)
green = INP(&H3C9)
blue = INP(&H3C9)
Every 3 reads the next higher color attribute settings are read.
There is software like Port Talk that can open LPT or COM port access for Qbasic. Dunno when QB64 will be able to do that.
A processor has a bunch of address pins, a bunch of data pins, and a read/write pin.
If the read/write pin is set to read, this is understood as meaning "whoever is in charge of address [xyz] please tell send my data pins the appropriate data".
If the read/write pin is set to write, this is understood as meaning "whoever is in charge of address [xyz], I have placed some data on my data pins".
You may expect that if you write to some address and later read from the same address, you will get the same data that you previously wrote. THIS MAY NOT BE TRUE IF THE ADDRESS DOES NOT SIGNIFY A RAM CHIP.
For example, the BIOS is stored on ROM chips. You can write whatever the heck you want to address 0xFC000, but the writes will be ignored, and reads will always produce the same thing. The region 0xA0000 to 0xC0000 is mapped to the VGA card (which treats reads and writes differently in certain modes) and so on. Modern network cards, hard disk controllers, USB controllers, and such stuff all get memory regions assigned to them.
Note that only the OS can access these regions. When normal programs try to access "memory", they only ever get RAM.
Now, the overcomplicated part. Whether it was for making assembly programming easier or reducing chip costs or making it harder to blow up your system by mistake or other reasons, Intel decided to make TWO buses- the "memory bus" that was accessible with MOV instructions, and the "IO bus" that was accessible with INP/OUT instructions.
Nearly all I/O operations apart from text/graphics output on the PC were done with I/O ports. But these days they are rarely used except for legacy devices.
> I read that these two functions read and write directly to and from the given address, unlike PEEK and POKE
Under DOS, PEEK and POKE read and write directly to "memory space". INP and OUT read and write directly to "IO space". They're different hardware namespaces, if you like.
Under NTDVM and DOSBOX, PEEK and POKE access virtual memory, and INP and OUT are emulated or virtualised.
> what is the real difference?
The difference is some hardware operations are done with PEEK and POKE, and some hardware operations are done with INP and OUT. This is due to design choices made by IBM and other manufacturers. VGA for instance exposes its display memory in memory space but is configured (changing screen modes, etc.) in IO space. PEEK and POKE can also be used to access data in RAM and that sort of thing.
> How does QB64 deal with the fact that the ports are not the same as they were, and can't be accessed the same way either?
QB64 doesn't even use VGA itself, it uses the SDL library. So it would have to emulate VGA-related INP, OUT, PEEK and POKEs, and translate them to the SDL API where applicable.
> I don't understand how that prepares it to take input values. What hardware port is taking this color information?
IBM published a programming interface for VGA, and those port addresses and OUT procedures are described there. DOSBOX internally has a "virtual VGA card" that conforms to that interface. I believe (could be wrong) that when running fullscreen, NTVDM actually tries to get the graphics card into a compatible state and essentially lets the program talk to the graphics card almost directly. When running in pure DOS you actually DO have total access to the graphics card...
qbasic homeworkby (no login)
I am taking a QBASIC class and to all you this is probably so simple. I need some help. I posted the homework assignment below. If anyone can help I would appreciate it!
Write a structured modularized program named PROB3A to input a stamp price from the keyboard. Based on the stamp price, create a screen display of a single spaced 12 line chart showing the cost of from 1 to 12 stamps. Use a For/Next loop to control the printing of the chart.
PART B. – Rewrite PROB3A as PROB3B to include two additional keyboard input values – one for the beginning number of stamps in the chart, and one for the ending number of stamps.
PART C – Rewrite PROB3A as PROB3C to list the prices for the following number of stamps: 5, 10, 15, 20, 25, 30, 35, 40, 45, and 50
Re: qbasic homeworkby Ben (no login)
Looks pretty basic, did you just start the course? I'm not sure what a "structured modularized program" is, but here's a start.
INPUT "stamp price"; x
PRINT "stamps", "price"
FOR i = 1 TO 12
PRINT i, i * x
INPUT "stamp price"; x
INPUT "beginning number"; x1
INPUT "ending number"; x2
PRINT "stamps", "price"
FOR i = x1 TO x2
PRINT i, i * x
INPUT "stamp price"; x
PRINT "stamps", "price"
FOR i = 5 TO 50 STEP 5
PRINT i, i * x
BEN does not follow ANY rules here!
1) Forget using *
2) Help homework cheats
3) Include "dirty" words in code
4) Continually act like the little jerk he is
Why have rules here if nobody enforces them?
AT LEAST REMOVE THE HOMEWORK ANSWERS FGS!
How can ANYBODY here call themselves "moderator"?
Thank God he didn't follow up with something worse, like envelope!
Solitaire could have axed his post if she wanted to and as for me, I really don't think what Ben posted was much in the way of help, more an example of how to get started.
Anyway, I doubt we are going to get a ton of homework posts here any more, as we are running out of Third World countries that still teach QBasic. And what on Earth is a Second World Country? My guess would be Canada, but soon I will have to rely on them for welfare support, so I better not put that in print... ah oops, too late.
I'll admit Ben has had a bit of a rough go of it here, but he has contributed much more interesting stuff than he has been a "problem" to the community, don't you agree?
The other thing is that I'm not a strict rules hound, the principles matter more to me than absolute rules.
All other comments (except for Canada) welcomed.
I didn't delete Ben's posts because:by Solitaire (no login)
1- He only posted hints on getting started, not the solutions.
2- I'm on a different computer (with no editing privileges) and didn't feel like re-logging on to Network54 just to edit Ben's posts (and then having to relog again later).
And Phylo probably had a similar reasoning, meaning it was more an example on how to get started than a "cheat" on the assignment. That leaves Galleon, who doesn't see QB homework assignments as a threat to the development of QB64, and Artilius, who was Ben in a past life.
I thought he actually did do the homework, but I didn't see as really making much difference. If it did, it's more likely to help than hurt,,, 'cause then it might bring more people, most of which might not stay, but a few of them will.
Now I'm glad I didn't though, since apparently he didn't give the guy the answers.
* Note: Phylo used "yours" correctly.by Solitaire (no login)
Pete should make YOU moderatorby Ben (no login)
Did you read the homework policy?by Solitaire (no login)
We will not do your homework for you. You won't learn anything that way, and it won't be fair to other students in your class who do their own work. You must show that you have made an attempt to solve the problem. Then post the code you have so far and let us know which part you are having trouble with. Someone will try to help you by giving you hints. But eventually you need to figure out how to do it yourself.
what?by gopus (Login gopus)
What could possibly be so difficult about managing this forum that people have no time to manage it?
Okay I offer my services...by gopus (Login gopus)
I understand that pete can no longer look after the forum. Obviously, I am the best choice as new moderator, so I humbly accept the position. I have been here the longest, was the one who had qbasic.com forum placed on network54.com, and I had the most dealings with Mallard and Mac.
*Ah, you remind me so much of Zip!by (no login)
Who are you?by Unseen Machine (no login)
I have only been using this forum for 7 months or so, so i dont really know anyone, YOU however, in those 7 months (as far as i know) have not contributed, asked anything or helped anyone, except badgering on about changing the colors of the forum and being a MOD. Why should you be allowed to moderate something you dont participate in? And as for accepting the posistion, who offered it to you?
I dont say this often, but i agree with CLIPPY on this one.
well...by gopus (no login)
Obviously, I have helped in many subtle and sophisticated ways that are beyond your comprehension. You do know, as most people do, that color scheme affects work environment and critical thinking skills right? There has been a plethora of research. My changing the color scheme would no doubt increase productivity amongst all the members of the community.
I just found a great place that makes the download immediate. My other site was making people wait 20 seconds to download if you were not a member.
Dropbox is slick! You add your files to their folder on your PC. It then automatically becomes available online to download. (The Dropbox program is active in task bar.)
Here is the new link:
But if you can think of something really stupid, like paying for free school lunches when schools out, paving roads that are already paved, etc., then I'd be happy to help.
PS I just recently updated that page, grrr... to fix a zip file for TheBOB. I think it used to download, but then N54 switched to case-sensitive file names. I got rid of some QB links that are no more on that page, too, and added Unseen's new site. Anyway, I will get to it soon, which usually means over the weekend.
*Thanks, Pete! (just read this for the first time).by (Login qb432l)
I know you've been busy rioting at the G20; so I didn't expect you to see the post about your zip file. Glad I got the download working again. It's too good to be without it.
- Hey, did you get that 5.0 California earthquake I sent you last week?
Thanks again, Pete -- also for the quake...by (Login qb432l)
It's a rare occurrence around these parts. I had just laid down for my after lunch nap when my bed started rocking rythmically. It was like being young again, but without the responsibility. Nothing like your California quakes, of course. My brother was down there when a big one hit. He was staying in a Motel and said that the entire swimming pool emptied in a few seconds. Wow!
And the G20 protests? A few hundred jerks all trying to get their 15 minutes at the same time. Oh, well. The conference was apparently a success.
Anyway, I appreciate your fixing the link.
protestsby Ben (no login)
if I were the ruler of Canada, I'd surely give them a reason to protest. But the streets would be empty, they'd be scared to death hiding in their houses.
If I had a nickel for every quarter I spent in those rooms, well, I'd still be renting them, but seriously those above ground plastic pools don't even do well in those 5.0 jobbers!
PS I know, the media here just airs the small percent of people, who probably crossed the border from the US, who are rioting. Honestly, I don't know why you guys don't put up fence. And a billion dollars for security... hmm, since the prim focus is on how to reduce deficits, you would think the $%$% ^%^& fools would have picked a cheaper place, like on an aircraft carrier.
Hey, not a bad idea about the carrier...by (Login qb432l)
Just think of the Sultan's yacht they could have floated in Toronto harbor for that 1.3 billion: easy to defend against protesters (blub, blub), and when the G20 was over, they could have sold it to Obama at a profit.
I made this program in QB64, but it won't work in Qbasic. LOF(1) returns 0.
Tg AS STRING * 3
Title AS STRING * 30
Artist AS STRING * 30
Album AS STRING * 30
Year AS STRING * 4
Comment AS STRING * 30
Genre AS STRING * 1
DIM Tags AS TagInfo
DIM tag AS STRING * 3
LINE INPUT "Enter MP3 file name(program will add .MP3): ", MP3$
MP3$ = MP3$ + ".MP3"
OPEN MP3$ FOR BINARY AS #1
start& = LOF(1) - 127
print start&, LOF(1)
GET #1, start& , tag
DO: LOOP UNTIL INKEY$ <> ""
IF tag = "TAG" THEN
GET #1, start& , Tags ' get all of the info
PRINT "Title: "; Tags.Title
PRINT "Artist: "; Tags.Artist
PRINT "Album: "; Tags.Album
PRINT "Year: "; Tags.Year
PRINT "Comment: "; Tags.Comment
I got LOF on a 27MB file correctly, anyhow.
"LOF should be able to handle files up to 2GB"?... try 9223372036GBby (no login)
The GFS update changed a lot of things, including the capabilities of QB64. The LOF size is now returned as a 64 bit integer value.
*You're right Artelius (PS. All hail Julia Gillard...rofl)by (no login)
*Yes, congratulations to all down under on your new female prime minister!by (Login qb432l)
*P.S. We Canadians had one, but only briefly (Kim Campbell).by (Login qb432l)
Just kidding, and trying to stay "Swiss" for the (you're/your) forum battle.
But seriously, no woman would ever make it as leader of the United States of America; although I suspect it would stimulate the tech industry. I mean just think of it, all the Cruise "ms"iles would have to be reprogrammed to ask for directions on the way to the target.
PS If Blondie stops by and reads this, I'm as good as dead.
My proposal on the your/you're debate...by (Login qb432l)
I propose we spell it "yourrr", as if we have an accent. Anyone calling us on it would then be politically incorrect: a much worse crime than misspelling OR pedantry.
Make Any Comments.
PS And the person who started the P.C. movement should be hit over the head repeatedly with a participation trophy.
Rs232 Signal levelsby Tom (no login)
Hey all basicly i been programing some rs232 stuff using windows .
Now i wanted to hold the tx line high to test somehardware so i done that using the
out 1019,64 ; which brings pin 7 high
but !!!! by rs232 specifications if u set a high bit output the rs232 line should invert to say minus -12v.... and if u set a low bit it goes 12 v plus !!
By using the out command above this does the oppsite to the rs232 specifcations.
So am i right in saying that windows normaly inverts this signal and where im using dos it is doin as i say and not inverting it like in the rs232 Specifation.
Cheers for anyhelp on this tom :)
Try Chapter 11.
Thx for help good demo :) doesnt explain my inverted singals thouby tom (no login)
Cheers for that demo seems really helpful good work there if u made it :).I will proberly use that for furture programing referneces but still is does explain bout the inverted rs232 line signals that im getting :). oh i and i meant pin3 not 7 .
Devices which use serial cables for their communication are split into two categories. These are DCE (Data Communications Equipment) and DTE (Data Terminal Equipment.) Data Communications Equipment are devices such as your modem, TA adapter, plotter etc while Data Terminal Equipment is your Computer or Terminal.
The electrical specifications of the serial port is contained in the EIA (Electronics Industry Association) RS232C standard. It states many parameters such as -
1. A "Space" (logic 0) will be between +3 and +25 Volts.
2. A "Mark" (Logic 1) will be between -3 and -25 Volts.
3. The region between +3 and -3 volts is undefined.
4. An open circuit voltage should never exceed 25 volts. (In Reference to GND)
5. A short circuit current should not exceed 500mA. The driver should be able to handle this without damage. (Take note of this one!)
Above is no where near a complete list of the EIA standard. Line Capacitance, Maximum Baud Rates etc are also included. For more information please consult the EIA RS232-C standard. It is interesting to note however, that the RS232C standard specifies a maximum baud rate of 20,000 BPS!, which is rather slow by today's standards. A new standard, RS-232D has been recently released.
Serial Ports come in two "sizes", There are the D-Type 25 pin connector and the D-Type 9 pin connector both of which are male on the back of the PC, thus you will require a female connector on your device. Below is a table of pin connections for the 9 pin and 25 pin D-Type connectors.
Serial Pinouts (D25 and D9 Connectors)
D-Type-25 Pin No. D-Type-9 Pin No. Abbreviation Full Name
Pin 2...............Pin 3..............TD Transmit Data
Pin 3...............Pin 2..............RD Receive Data
Pin 4...............Pin 7..............RTS Request To Send
Pin 5...............Pin 8..............CTS Clear To Send
Pin 6...............Pin 6..............DSR Data Set Ready
Pin 7...............Pin 5..............SG Signal Ground
Pin 8...............Pin 1..............CD Carrier Detect
Pin 20..............Pin 4..............DTR Data Terminal Ready
Pin 22..............Pin 9..............RI Ring Indicator
Table 1 : D Type 9 Pin and D Type 25 Pin Connectors
Abbreviation Full Name Function
TD Transmit Data Serial Data Output (TXD)
RD Receive Data Serial Data Input (RXD)
CTS Clear to Send This line indicates that the Modem is ready to exchange data.
DCD Data Carrier Detect When the modem detects a "Carrier" from the modem at the other end of the phone line, this Line becomes active.
DSR Data Set Ready This tells the UART that the modem is ready to establish a link.
DTR Data Terminal Ready This is the opposite to DSR. This tells the Modem that the UART is ready to link.
RTS Request To Send This line informs the Modem that the UART is ready to exchange data.
RI Ring Indicator Goes active when modem detects a ringing signal from the PSTN.
Thxby tom (no login)
Cheers for your help dude i understand that bit thou what i was trying to say when i apply my logical 1 i was getting the +12 v rather than the -12 i should get ....
Anyways i kinda worked my way round that another question thou since u seem to know a lot bout rs232 is there a specific idle time length between bytes i.e between the start and stop bits cheers tom :)
parallel portby Ben (no login)
i know you know about the parallel port and i was wondering say i have 8 buttons connnected to the parallel port say if i were to use 1 button per data pin i would be limited to 8 buttons but there is this thing i think called a mulitpleksor or something that could take the 8 inputs and make them into say 3 outputs with binary you know how to practically implement this type of system without any fancy equipmnent
hmmby .. (no login)
ahh a multiplexer basicly you use an address line to choose which data you want on the data line.
no not like thisby Ben (no login)
but anyway, how would you synchronize the address line with the demultiplexer on the other side?
1) Use a multiplexer. 3 output pins of the parallel port select the address. Multiplexer output is connected to an input pin. Your software cycles through all the addresses, reading the input pin.
This approach is essentially a "query->response" approach.
If you don't like using 3 output pins, you can use 1 instead, and put a counter on the outside that counts from 0 to 7 based on the pulses on the output pin. But it is tricky to synchronise the software and hardware counters.
2) Use 3 input pins. Assume no more than 1 button will be pressed at once. You can have 7 buttons (numbered 1 through 7) and the binary values for all the currently pressed buttons are just ORed together. So if a single button is pressed you get a number from 1 to 7. If no button is pressed you get 0. If more than one button is pressed you get garbage.