QBasic and QB64 Discussion Board

[QB Forum Archives (1999-2009)/ ] [QB FAQ] [QB Links and Downloads] [Subforums and Chat Room] [Search]

QB64.Net Homepage   QB/QB64 Keywords   QB Graphics Forum   Homework Policy



Pete Scores!

by Pete (no login)

As in I scored my first golf tournament with my new BASIC program in my Android device. I was able to put the 6 libraries I coded together with a very small main module and presto, scrolling mobile app that keeps track of players and their scores. The language is very similar to QB, but not as powerful for text applications. I may very well have to force myself into graphics, which are superior to QB in that they are designed for mobile applications.

File management is accomplished exactly the same way as QB, that was nice, but I need to add a couple more functions to my QB to Android-BASIC converter to fully convert the golf app without a few manual tweaks. So far, I'm really impressed at the similarities between the 2 dialects. In other words, it is much easier to make a few minor adjustments and code in Android-BASIC than it would be to hang on to a hope and a prayer that QB6 will ever go mobile before the invention of flying cars.

Next up, I will either need to experiment with a mix of graphics and text, to see if I can make a PCOPY clone for a text screen, or simply write a PCOPY routine in text. One thing is for sure, I have developed a renewed respect for the many valuable tools and features the QB programmers created, including excellent documentation. For Android-BASIC, you pretty much have to already know how to program in BASIC, or the very limited documentation would make learning near impossible. No forum of internet program examples, either.

Pete

Posted on Oct 31, 2014, 5:31 AM

Respond to this message   

Return to Index


Pete, can you remind us your view on open source software?

by Docfxit (no login)

I understand that it also plays a role in qb64 development as some of the libs licensing forces it to be open source. Sometimes while rarely seeing the convoluted code snippets you post on this forum, usually on text parsing/processing (lots of LEFT$s, RIGHT$s, and MID$s), I always wonder what mess you manage to squeeze in your hundred thousand line business/organization programs you mention.

Posted on Oct 31, 2014, 5:58 AM

Respond to this message   

Return to Index


what the heck happened to kewbie?

by mn (no login)

he was here last year. i guess he codes in perl now. if we lurk in chat he'll see us?

:(

Posted on Oct 29, 2014, 2:00 AM

Respond to this message   

Return to Index


* WRONG FORUM DOG BREATH!

by Clippy (Login burger2227)
R

Posted on Oct 30, 2014, 12:30 PM

Respond to this message   

Return to Index


*yeah, i should post in the cafe. OH WAIT CANT B/C ITS NOT "ALLOWED" make up your mind!

by mn (no login)

Posted on Oct 30, 2014, 12:34 PM

Respond to this message   

Return to Index


seriously, you can't have it both ways

by mn (no login)

and if you do have it both ways, PLEASE... don't put a picture of it here with the other ones!

Posted on Oct 30, 2014, 12:40 PM

Respond to this message   

Return to Index


We need a new forum for your IDLE CHAT!

by Clippy (Login burger2227)
R

I have things to say and you have nothing to say, but talk about people who are not even here...

and will NEVER ANSWER!

Posted on Oct 30, 2014, 12:45 PM

Respond to this message   

Return to Index


*your post is off topic to this thread

by :P (no login)

Posted on Oct 30, 2014, 12:51 PM

Respond to this message   

Return to Index


* What does Kewbie have to do with QB or QB64?

by Clippy (Login burger2227)
R

Posted on Oct 30, 2014, 12:54 PM

Respond to this message   

Return to Index


for one, it rhymes

by mn (no login)

you don't. seriously, have pete change the name to "clippy's cafe." it should be called "clippy's cafe" because it IS "clippy's cafe."

you can delete everything i post there, i won't post new things, and you can tell people not to post, and have all your "idle" chat there.

better than all this "meta" chat.

Posted on Oct 30, 2014, 12:57 PM

Respond to this message   

Return to Index


Oh go to your Linus room and sit in the corner...*

by Clippy (Login burger2227)
R

Posted on Oct 30, 2014, 1:04 PM

Respond to this message   

Return to Index


you don't get it, do you?

by mn (no login)

i won't post in a forum you run.

you act like you run the cafe, and i'm so bored with your crap there, i don't really need it.

add to that the REAL current policy about this one, and i see no reason not to use it. ESPECIALLY when i only wanted to ask about kew. EXCUUUUUUUUSEEEEE... MEEEEEEEEEEEEEE!

a lot of people only check this forum or glance at the index. until that changes, or until the policy changes, your telling me what to do means NOTHING. you don't even have the policy to back you up... the one that some people like becaus a social contract theoretically helps people get along, until people like you enter the picture who just find it all a handy cudgel.

but if they give you the cafe, you can make all the silly and arbitrarily-enforced rules there you want. for real this time, not just in your perpetually half-drunken state. everybody wins. wouldn't that be swell? i'm seriously all for it. don't you want to be able to say you're the real moderator there, instead of just the thuggish troll yelling at people for posting? you could have authority behind the nonsense you spew. how about it? eh? eh?

Posted on Oct 30, 2014, 1:13 PM

Respond to this message   

Return to Index


i guess someone is working on an sdl2 version of qb64

by mn (no login)

that's good. i don't think sdl/gl is the most important issue (i'd rather see sdl continue to have at least as much support as it had in previous versions,) but i know it's important here. it will be interesting to see what the sdl version is like.

since i'm not against new features, and this is technically downstream of the official version (as far as i can tell,) i wonder if the author can be convinced to slow down the "ready! fire! AIM!" development influence on their downstream version.

no feature should be added without some thought and feedback, imo. if there's no feedback requirement (and why not? why add features without consulting the people that will be using them, when it's trivial to have that feedback from the users?) then it should be thought about really, (really) hard first.

but right now, racing to the start line doesn't seem like much of an issue. inkey$ will have to be rewritten (i didn't gather why, but i'm guessing sdl 2 just breaks the current implementation) and unless it speeds up, this might be a "take your time" project, which '64 could really use right now. this of course (as usual) is only my opinion, but i won't be SO surprised if i'm required to "prove" it anyway. :/ oh well, that's the internet for you. anyway it's a good thing they're not letting me name it, or i'd call it qb65.

Posted on Oct 26, 2014, 11:39 PM

Respond to this message   

Return to Index


ROFL @ QB65

by Pete (no login)

I tried several weeks ago to install SDL2 over SDL, but no happiness there. I haven't tried to use it to replace GL. It almost makes me wonder if it would be a closer shot, since the new SDL2 supports GL. Oh well, a bit foreign to me, anyway.

SDL compiles aster, because it isn't stand alone, and that is a plus. Builds are smaller, and that is a plus too. My cat is sitting on my Android device while I'm typing. Oh well, at least the screen is warmed up, but I digress...

I hope it works out. It would be nice to have that option.

Pete

Posted on Oct 27, 2014, 8:09 AM

Respond to this message   

Return to Index


I'm already QB65 and the way things are going I'll never see GL done!

by Clippy (Login burger2227)
R

All I wanna do is run ONE PROGRAM I made in an Android device. Maybe I can talk Galleon into that?

Posted on Oct 27, 2014, 10:42 AM

Respond to this message   

Return to Index


what languages are you interested in?

by mn (no login)

if the only language you care about is BASIC, that's perfectly reasonable. it's one of the best languages of all time. i'm guessing you use qb64 exclusively. (if so, great.)

it's not easy to find a language as easy or fun as basic. javascript has ubiquity, suitable as a first computer language, but too tedious to make any other comparison to basic. my feelings on python are known. tried pascal, didn't take to it but it had potential. bash is good, sometimes a pain / lousy for complex scripts, great for 1 day projects.

compiled the newest yabasic recently. brandy (bbc basic) might be more fun. it's not qb, but is a lot more popular with brits.

any languages that you admire/use that you haven't talked about here? only curious.

Posted on Oct 27, 2014, 3:21 PM

Respond to this message   

Return to Index


All I need is a way to convert QB64 code...*

by Clippy (Login burger2227)
R

Posted on Oct 27, 2014, 3:58 PM

Respond to this message   

Return to Index


you couldn't post it here, could you?

by mn (no login)

pete has been having good success with android basic.

while i would never try to endorse it (i see no point in putting long term stock in another compiler or interpreter that will just be abandonware like qbasic someday) it seems like the thing that would most likely achieve your goal.

i'd much rather see qb64 support android, though the three of us (myself included) are convinced that won't happen.

having a smaller language work well across platforms and hardware like android, mac, windows is a better use of time than having a language get larger and ultimately unsupported, but we'll see how that goes.

that's beside the point. what about android basic?

Posted on Oct 27, 2014, 4:20 PM

Respond to this message   

Return to Index


i hope qb65 dynamically links sdl. (it's win-win, i'm sure i'm alone in this for now)

by mn (no login)

i don't care about windows users. it's not that i have no heart, it's just that anyone who is willing to be dragged through every stupid whim that microsoft subjects them to, version after version, obviously wants pain. who am i to argue? but i can't help people like that very much.

i don't know if qb64 (the sdl version from whatever year) dynamically or statically links sdl. i may have had to install it (because even if you have the regular version installed, you may need the dev version with bindings or whatever, to compile things with it. this is not an area of expertise and i digress.)

so i don't know if sdl is in every binary that gets compiled by qb64 or not, and even if it wasn't, it might be different for windows. which for sdl2 could lead to some freaking huuuuuge binaries.

it's win-win because the convenience of static binaries is very basic, and somewhat ideal. the whole idea of the parts system is to avoid too much stuff being included. but sdl clashes with that, because (for whatever reason, because i was under a different impression) sdl has to bring *everything* in.

it's win-win because you either get the basicness of static binaries, or the sanity of smaller binaries, which hopefully link everything statically EXCEPT (perhaps) sdl2. not including it statically could cause all kinds of problems, maybe, so it would only be worth it dynamically if there wouldn't be too much of a tradeoff. whatever they do with it, i hope it makes the users happy. (meaning the original users, for whom sdl matters more.)

Posted on Oct 28, 2014, 9:14 PM

Respond to this message   

Return to Index


One very happy camper

by Pete (no login)

I'm finally doing what I wanted to do but didn't have the time to do when I was programming apps to run my practice... build libraries.

Sure, it's slow work, variable tables, documentation, trying to figure out the easiest ways all pieces can be called and it together, but it has got me interested in programming new stuff.

The best part is I'm working on small things, like a print to screen routines, keyboard input routine, cursor routine, etc., and with code under 300 lines, it isn't too difficult to convert to Android.

So today I managed to put two libraries together, and I can get a multi-line prompt with up to 3 responses scrollable application that works on my mobile device.

I will need to substitute mouse routines for touch screen gestures pretty soon, but or now, everything works o the Android display keyboard.

My SCREEN 0 jokes aside, there are times I wish I were as comfortable with graphics as I am with text. Not to make games, but rather to display text with some better quality background than you can get with a text console.

Pete




Posted on Oct 25, 2014, 7:52 PM

Respond to this message   

Return to Index


it will be pretty trivial to do that when you're creating libraries

by mn (no login)

isn't it great to use a language that puts the user in control, rather than feeling like you're somehow doing it all at the author's mercy?

at the end of the day, screen 0 is so graphical. you move to y, x (because the y axis or ordinate is more analog to row location, but you may have said this dialect reversed them so they're more like graphics routines...) and then it places image named (character or string) at that location. only wrap is outside the metaphor.

i think of pset like locate and print. screen 13 made it more obvious; you have a palette of 256 values (same as ascii) each with their own color assigned. so it was no different than locating a certain row and column and putting chr$(219) in a certain color.

i can't imagine what else you need to make your own graphical locate and graphical print command, other than the possibility of using non-monospaced fonts (that makes it a little more work.) wherever you are with this, you're clearly almost there. put it in your library and enjoy a smoother screen 0. (then again, i've never loved text on anything other than solid colors. occasionally, i've used a translucent term window, but it's easy to get tired of.)

good luck.

Posted on Oct 25, 2014, 9:13 PM

Respond to this message   

Return to Index


Camp Pete's response library

by Pete (Premier Login iorr5t)
Forum Owner

This BASIC library building is fun. I wish I would have done this stuff 30 years ago, but I was in too great a hurry to produce apps in the time frame I needed to use them I guess.

This routine allows a user to move from one response field to another using the cursor arrow keys. I didn't add TAB, because Android doesn't have it.

- Pete

-------------------------

DIM response$(200, 3), responsecol(3)
'
LocationMethod = -1
nResponses = 3
responsenum = 1
responsewidtxh = 2
responsesboxes = 0
responsecol(1) = 1
responsecol(2) = 6
responsecol(3) = 11
totalentries = 2
'
CLS
PRINT "72   84   69"
PRINT "aa   bb   cc";
'
LOCATE 1, 1, 1, 7, 30
yrow = CSRLIN
xpos = POS(0)
indextext = 1
'
DO
   _LIMIT 30
   keyboard$ = INKEY$
   GOSUB Eval_Response_Fields
   GOSUB KeyboardInputTest
   GOSUB Test_Library
LOOP
'
KeyboardInputTest:
SELECT CASE keyboard$
   CASE CHR$(0) + "K"
      IF LocationMethod THEN
         xpos = xpos - 1
         LOCATE yrow, xpos
      ELSE
         LOCATE , POS(0) - 1
      END IF
      '
   CASE CHR$(0) + "M"
      IF LocationMethod THEN
         xpos = xpos + 1
         LOCATE yrow, xpos
      ELSE
         LOCATE , POS(0) + 1
      END IF
      '
   CASE CHR$(0) + "H"
      IF indextext > 1 THEN
         IF LocationMethod THEN
            yrow = yrow - 1
            LOCATE yrow, xpos
         ELSE
            LOCATE CSRLIN - 1, responsecol(responsenum)
         END IF
         '
         indextext = indextext - 1
      END IF
   CASE CHR$(0) + "P"
      IF indextext < totalentries THEN
         IF LocationMethod THEN
            yrow = yrow + 1
            LOCATE yrow, xpos
         ELSE
            LOCATE CSRLIN + 1, responsecol(responsenum)
         END IF
         '
         indextext = indextext + 1
      END IF
END SELECT
RETURN
'
Test_Library:
xx = CSRLIN: yy = POS(1)
LOCATE 10, 1: PRINT "Response #"; responsenum
LOCATE xx, yy
RETURN
'
' -------------------------------------LIBRARY-----------------------------------------
Eval_Response_Fields:
SELECT CASE keyboard$
   CASE CHR$(0) + "K"
      ' Eval_Previous_Response
      IF POS(0) > responsecol(1) THEN
         IF POS(0) = responsecol(responsenum) THEN
            responsenum = responsenum - 1
            IF LocationMethod THEN
               xpos = responsecol(responsenum)
               LOCATE yrow, xpos
            ELSE
               LOCATE CSRLIN, responsecol(responsenum)
            END IF
            keyboard$ = ""
         END IF
      ELSE
         IF indextext > 1 THEN
            responsenum = nResponses
            xpos = responsecol(responsenum)
            keyboard$ = CHR$(0) + "H"
         ELSE
            keyboard$ = ""
         END IF
      END IF
   CASE CHR$(0) + "M"
      ' Eval_Next_Response
      IF POS(0) = responsecol(responsenum) + responsewidtxh - 1 THEN
         IF responsenum < nResponses THEN
            responsenum = responsenum + 1
            IF LocationMethod THEN
               xpos = responsecol(responsenum)
               LOCATE yrow, xpos
            ELSE
               LOCATE CSRLIN, responsecol(responsenum)
            END IF
            keyboard$ = ""
         ELSE
            IF indextext < totalentries THEN
               responsenum = 1
               xpos = responsecol(responsenum)
               keyboard$ = CHR$(0) + "P"
            ELSE
               ' End of Entries
               keyboard$ = ""
            END IF
         END IF
      END IF
END SELECT
RETURN

Posted on Oct 26, 2014, 7:30 PM

Respond to this message   

Return to Index


so is this going to be the mobile basic forum?

by mn (no login)

not sarcasm. obviously qbasic will always have a place of honor here (even if it gets "deprecated" as "classic" elsewhere.)

(can we go for "classic" instead of "old" or "deprecated," by the way? i mean, when the new guys come in and start trash-talking the very thing that made the new thing possible?)

i think you could probably try a variety of experimental names for the forum (one a week?) and see what people say... because you could always change it back in a month to "the qbasic forum" or you know... stuff. i've seen some of the forums that talk about "modern" basic or rather "classic" basic on modern platforms.... which is more interesting to me than the "fad" gamer-centric hype machine that always seems to miss the point of a language geared towards being friendly.

at least they start with a friendly language. but then they buckle down and get towards the tedious business of removing/burying/trash-talking one of the languages biggest strengths (not just by deprecating or breaking the features, but by deprecating the culture.)

i still don't know your secret plans, but i'm still curious. i'm not recommending you change any forum titles for more than a week unless it provokes a POSITIVE reaction. anything else, and nevermind. realism and idealism can surely meet somewhere. working on the premise that whatever qb was to us, it's going to matter more to other people what it is to the new users of that name. up to you, naturally.

Posted on Oct 26, 2014, 8:30 PM

Respond to this message   

Return to Index


*(if i just screwed that up i'm penitently sorry)

by mn (no login)

Posted on Oct 26, 2014, 8:32 PM

Respond to this message   

Return to Index


*nevermind. that predates my reading your other post. subforum sounds great

by mn (no login)

Posted on Oct 26, 2014, 8:36 PM

Respond to this message   

Return to Index


I envy you, happy camper...

by TheBOB (Login qb432l)
R

I would LOVE to find a renewed interest in programming. Some of my happiest times were when I had a project underway that interested/excited me. I would wake up and spot my computer and coffee pot waiting for me and feel great!

I don't understand much of what you're up to, but I certainly envy your enthusiasm.

-Bob

Posted on Oct 27, 2014, 6:01 PM

Respond to this message   

Return to Index


was just reading article about one reason coders burn out (you won't believe what it is!)

by mn (no login)

sorry about the part in parentheses, making fun of stupid click-bait articles is fun... you will almost certainly believe what it is.

i was actually just reading an (insightful) article about coder burnout. and i understand the difference between tired and bored.

interestingly, the article said that most languages are outgrown by an intelligent user (as opposed to a point/click jockey, i suppose) and start to become tedious and overly mechanical. in other words, no longer fun.

this article separated easier languages from ones designed for experts. i won't do that. rather i'll apply the idea to my own experience, and say that while i always agree in languages that are easy to teach and easy to learn, it's good to have a stratification that allows you to move from from the more mechanical to the (very slightly) more profound and efficient.

the problem is the same, whether you're an elitist (i know you're anything but) or just bored: drudgery. stagnation. worst of all, rote.

the solution, whether for the elitist or just the bored, seems the same also: a new challenge with new tools. these tools may be a level of language yet untapped, or another language altogether. they could even be simply a new task, but it sounds like you're past that stage to be honest.

pete had a new language that should have satisfied his boredom and drudgery, but it's not that simple. i personally think that there's a small, but sisyphean aspect to the language in question.

sometimes it's fun to rebuild certain parts of a language that are missing. it's a lot less fun to discover belatedly and work around the arbitrarily half-working implementations of too many things. in other words, you can have a lot of fun with duct tape until you're on your 12th roll for a single task. (unless the task is making a scale model of the statue of liberty entirely out of duct tape. that could be a hoot! and yours would probably improve on the original.)

but back to pete's solution: he tried "something else entirely" (well, sort of,) he tried a few different dialects on a different platform, and broke out of what was probably getting to be some pretty awful stagnation.

i think pete is honestly clever (but don't tell him i said so,) but i think there's a consensus around here that none of us would hope to accomplish the works of art you've done here. i suspect it's time for a new medium, but for selfish reasons (and i think i speak for others on this) i hope your medium is still digital.

you need a new bag. that's no crime, one might wonder what took you so long. i hope you have fun and come show us, but you obviously need a new bag.

i can see you or pete scratching both itches with javascript for example (it's well suited to both of your needs, and makes certain things trivial that might make the rest of its baggage worthwhile) but i didn't recommend it to pete because i know he needs file support in a way you just don't, and even with html5 i can't imagine how stupid and ugly file support would be. that is just one example; the point of all this is far from recommending an overall tedious language like js.

Posted on Oct 27, 2014, 6:28 PM

Respond to this message   

Return to Index


*A new bag for sure

by Ben (no login)

Posted on Oct 27, 2014, 6:40 PM

Respond to this message   

Return to Index


looking for a new bag can be a drag

by mn (no login)

i was starting to think i'd never find one, and really starting to believe i'd never like one.

took at least a year or two. it was worth at least a year or two of looking. a lot of the reason it took so long is i'm a lot more stubborn than thebob.

once he gets his head in the right place, i suspect he could find what he's looking for in a week or two.

Posted on Oct 27, 2014, 6:47 PM

Respond to this message   

Return to Index


Yeah, my problem was never with the language...

by TheBOB (Login qb432l)
R

Once I started using QB64, there were all kinds of new possibilities that opened up. The real problem was that I had done most everything I'd ever wanted to do as a (graphics) programmer. Any new considerations were all been-there-done-that.

The thing that inspired me with Pete's post, was that it might be possible to wake up one day with a renewed interest in programming--a new idea for a game or whatever. Short of that, I don't see myself getting interested again. As I've said before, I'm not really a programmer, but rather, an artist who learned programming in order to express himself artistically.

Thanks for your input, though.

-Bob

Posted on Oct 27, 2014, 6:48 PM

Respond to this message   

Return to Index


here's a project i'd like to see on your graphics forum

by mn (no login)

a series of "blog posts" (i don't care what you call them, i'll use that term until you suggest another) on how to do what you do.

i know you've talked about that sort of thing before, and there's no need to put the emphasis on programming. people here know how to program (well, i know a little about it) and those who need to know how to bitblit and bload and get and put, we've got tutorials on all that; some are yours.

i honestly don't think our brains work the way yours does. but i don't believe they're hardwired, either.

it's not easy to take the concepts you work with naturally and dice them into little chunks of text that the more left-brained can process, but there's a lot of room to try. like with programming, basic art concepts are basic art concepts, and i'm more interested in how you personally like to shade or compose (or reassemble) than how they teach it in beginner's art courses.

pictures would help, but i think words can go a long way. i'd like to better understand how you see the world, both technically and philosophically. but that's a lot of work, of course. i'd recommend just spewing out whatever comes to mind, and let us worry about what to do with it. i'm sure i'd find it interesting, but honestly i wouldn't ask you to bother withthe effort of such a task if i didn't think it would help break up some of your creative blocks. and if i'm wrong, no worries: that's my final idea about the matter. thanks for everything you've done for us, and for qbasic graphics. seriously.

Posted on Oct 27, 2014, 6:59 PM

Respond to this message   

Return to Index


*Wow. Food for thought--thanks, menn.

by TheBOB (Login qb432l)
R

*

Posted on Oct 27, 2014, 11:24 PM

Respond to this message   

Return to Index


a possibility in running x11basic (with color) on windows without ansi.sys

by mn (no login)

bear with me, this is a python trick for getting limited ansi support in 32-bit (maybe 64) windows.

it has not been tested, and may require downloading and installing colorama (free/libre.) it will definitely require you to run the python installer.

from os import system
from colorama import init
init()
system("x11basic")
# that's it

other windows/cross platforum dialects that may benefit: yabasic, python itself, any other dialect that doesn't have built-in analogs of COLOR() ... though at this point, i may have found one.

if i thought it had no chance of working, i wouldn't put it here. i've gotten weirder things to work, i once imported pictures into basic by running a dos picture viewer with a switch to exit after loading, hit alt-enter a couple times to switch back and forth from window to full screen, then used basic to read the pixels with point(x, y) i mean, i think it was point(). this was in win3.1 or 95 days. i don't know if this is one of those kinds of things or not.

Posted on Oct 21, 2014, 9:59 PM

Respond to this message   

Return to Index


If I had a junker PC, I'd give it a try.

by Pete (no login)

But I need to keep the one I'm using up, so I don't experiment with it.

I have set aside X11, because that LOCATE bug it has really annoys me.

Some good progress was me figuring out a way I could install apps directly to my android device. Now I simply save a BASIC program to my PC, and transfer it directly to the Android-BASIC folder.

Pete

Posted on Oct 21, 2014, 10:39 PM

Respond to this message   

Return to Index


bah, i've got a desktop and laptop you could have, but it's not worth the shipping

by mn (no login)

i've been refurbishing for a while. well, it's silly to call it that. it's the same kind of refurbishing that goes for pawn shops and thrift stores: check cables, reinstall o.s., see if it boots. they often skip step 2, it's not always an option, and neither always is step 1.

i bet michael does it 10 times better. as for the professionals... well, there are some wonderful stories online about shenanigans at apple's fixit dos.

how hard is it to get a junker pc these days? i mean where you are. anything with at least 500mb of ram should be able to run debian or if it has to be ubuntu, xubuntu is probably the least silly of them (among xubuntu versions, you'd want an lts.)

best of all you'd never have to install ansi support ever again... ha, i know it'll never happen. i like it for one (and two and three) because it's like dos: you can boot from a single disc with no hard drive, and you never have to "authorize" a stupid os installation again. but it was a complete pita for a few years (dos surprisingly, not as much...)

Posted on Oct 21, 2014, 10:57 PM

Respond to this message   

Return to Index


Converting QB code to print on Android.

by Pete (Premier Login iorr5t)
Forum Owner

This is a QB program I've converted to begin a scrolling program on my Android-BASIC project.

--------------------

text_viewport_top = 1
text_viewport_bottom = 15
text_viewport_lefxt = 1
text_viewport_widtxh = 24
text_indent = 0
FOR i = 1 TO text_viewport_widtxh - 5
   blank$ = blank$ + " "
NEXT
CLS
VIEW PRINT 1 TO 15
' Dimension Arrays
DIM Text_Displaxy$(1000)
' Place data into array
FOR i = 1 TO 20
   READ a$
   x$ = MID$(a$, 1, LEN(a$)) + MID$(blank$, LEN(a$), text_viewport_widtxh - LEN(a$))
   Text_Displaxy$(i) = x$
   ' Get total entries as {i} for READ, FILE, or any other input methods.
   total_entries = total_entries + 1
NEXT
' Print contents to screen
LOCATE text_viewport_top, text_viewport_lefxt + text_indent
FOR i = 1 TO text_viewport_bottom
   text_row = text_row + 1
   index_text = index_text + 1
   LOCATE text_row, text_viewport_lefxt + text_indent
   PRINT Text_Displaxy$(i);
NEXT
' Place an arbitrary cursor at last entry printed.
LOCATE text_row, text_viewport_lefxt + text_indent + LEN(RTRIM$(Text_Displaxy$(index_text)))
PRINT " _";
' Audit keyboard
WHILE -1
   WHILE -1
      b$ = INKEY$
      '' QB to Android-BASIC key conversion
      IF b$ = CHR$(0) + "H" THEN b$ = CHR$(30)
      IF b$ = CHR$(0) + "P" THEN b$ = CHR$(31)
      ''
      IF b$ = CHR$(30) OR b$ = CHR$(31) THEN
         EXIT WHILE
      END IF
   WEND
   ' Scrolling Routine
   SELECT CASE ASC(b$)
      CASE 30
         ' Scroll up
         IF index_text > 1 THEN
            SELECT CASE text_viewport_top = text_row
               CASE 0
                  LOCATE text_row, text_viewport_lefxt + text_indent + LEN(RTRIM$(Text_Displaxy$(index_text)))
                  ' hide cursor
                  PRINT "  ";
                  index_text = index_text - 1
                  text_row = text_row - 1
                  LOCATE text_row, text_viewport_lefxt + text_indent + LEN(RTRIM$(Text_Displaxy$(index_text)))
                  PRINT " _";
               CASE ELSE
                  ' hide cursor
                  LOCATE text_row, text_viewport_lefxt + text_indent + LEN(RTRIM$(Text_Displaxy$(index_text)))
                  PRINT "  ";
                  index_text = index_text - 1
                  FOR i = index_text TO index_text + text_viewport_bottom - 1
                     LOCATE i - index_text + 1, text_viewport_lefxt + text_indent
                     PRINT Text_Displaxy$(i);
                  NEXT
                  ' Send cursor back to the top
                  LOCATE text_row, text_viewport_lefxt + text_indent + LEN(RTRIM$(Text_Displaxy$(index_text)))
                  PRINT " _";
            END SELECT
         END IF
      CASE 31
         ' Scroll down
         IF index_text < total_entries THEN
            LOCATE text_row, text_viewport_lefxt + text_indent + LEN(RTRIM$(Text_Displaxy$(index_text)))
            ' hide cursor
            PRINT "  ";
            SELECT CASE text_viewport_bottom = text_row
               CASE 0
                  text_row = text_row + 1
                  index_text = index_text + 1
                  LOCATE text_row, text_viewport_lefxt + text_indent + LEN(RTRIM$(Text_Displaxy$(index_text)))
                  PRINT " _";
               CASE ELSE
                  ' Cursor is on last input line.
                  ' move cursor down
                  PRINT
                  index_text = index_text + 1
                  LOCATE text_row, text_viewport_lefxt + text_indent
                  PRINT Text_Displaxy$(index_text);
                  LOCATE text_row, text_viewport_lefxt + text_indent + LEN(RTRIM$(Text_Displaxy$(index_text)))
                  PRINT " _";
            END SELECT
         END IF
   END SELECT
WEND
END
DATA "This is a test for"
DATA "The scrolling"
DATA "capabilities of the"
DATA "the Android tablet."
DATA "The program will"
DATA "use the arrow up and"
DATA "down keys to scroll"
DATA "this text in the"
DATA "Android device"
DATA "window. I will add"
DATA "a color matrix to"
DATA "the library as"
DATA "soon as the plain"
DATA "text scrolling has"
DATA "been adequately"
DATA "accomplished."
DATA "This concludes this"
DATA "initial test of"
DATA "the Android device"
DATA "scrolling algorithm."

Posted on Oct 21, 2014, 8:24 PM

Respond to this message   

Return to Index


*it's a great looking dialect. the gui stuff is not at all awful. super basicy goodness

by mn (no login)

Posted on Oct 21, 2014, 8:37 PM

Respond to this message   

Return to Index


Re: *it's a great looking dialect. the gui stuff is not at all awful. super basicy goodness

by Pete (no login)

Actually, the post is all QB code, but made so it is as easy as possible to convert to Android-BASIC, which has these differences for that code:

DATA for strings needs to be enclosed in quotes. If not, it tends to split lines or no apparent reason when read.

Do not use any keywords in REM. Use ' mark to avoid this.

Do not use any keyword as part of a variable.

LOCATE is flip-flop of QB (eg: POS(0), CSRLIN). LOCATE can only accept row and column, other added QB cursor parameters will be ignored.

ENDIF instead of END IF.

BREAK instead of any EXIT statements.

Only accepts WHILE for loops.

TIMER is 1000 times QB. Use TIMER / 1000 to emulate QB timer.

CONSOLE is required to set text screen.

SELECT CASE does NOT support (-) negative numbers.

Posted on Oct 21, 2014, 10:43 PM

Respond to this message   

Return to Index


*not bad! i've tried much worse

by mn (no login)

Posted on Oct 21, 2014, 11:01 PM

Respond to this message   

Return to Index


a question for pete, regarding old main-forum conventions (url)

by mn (no login)

(remember these?)

cross-forum notices: http://www.network54.com/Forum/183705/message/1413881459/

Posted on Oct 21, 2014, 1:54 AM

Respond to this message   

Return to Index


BRILLIANT! So now ONE POST CAN TAKE UP MULTIPLE FORUMS!

by Clippy (Login burger2227)
R

Posted on Oct 21, 2014, 4:58 AM

Respond to this message   

Return to Index


*please try to reply in the thread linked to in the url, to avoid hypocrisy

by mn (no login)

Posted on Oct 21, 2014, 5:24 AM

Respond to this message   

Return to Index


Like this?

by Clippy (Login burger2227)
R

Posted on Oct 21, 2014, 5:36 AM

Respond to this message   

Return to Index


Clippy, please quit ruining my board

by gopus (no login)

Thank you.

Posted on Oct 21, 2014, 1:38 PM

Respond to this message   

Return to Index


* Take it easy, please. (Stay calm, and watch baseball.)

by Michael Calkins (Login MCalkins)
Moderator

Posted on Oct 21, 2014, 4:28 PM

Respond to this message   

Return to Index


That would be good advice...if I wasn't a Dodgers fan!

by Pete (no login)

I'm lucky I only got to see the last 10 min of that final series game, in the golf shop. I felt sorry for my friends, who recorded it.

I hope those two can air out their differences without intervention. I fine with you or any of the other mods making any decisions you feel are necessary for the forum. Just so you know, I am not overly concerned about what Mac would call clutter as o late, because this is a transitional time, and people need to express their opinions easily, until it is all sorted out. We don't have personal email PM or whatever it is called, but I am in favor of getting back to using the community forum or such discussion, when the changes are launched.

Pete

Posted on Oct 21, 2014, 6:39 PM

Respond to this message   

Return to Index


Long key presses? Let's go bowling with Pete again!

by Pete (Premier Login iorr5t)
Forum Owner

What few mobile BASIC languages that exist are quite limited compared to QB. Some only allow for INKEY$, no INP(), and I haven;t checked out PEEK/POKE methods yet.

A lot o mobile devices rely on long key presses, as a way to give the user more keyboard choices. A limitation with INKEY$ has always been key status. INKEY$ will indicate false at times when a key is held down constantly. To get around that problem, we make a routine. So let's go bowling!

---------------------------

' LONG KEY PRESS DEMO USING INKEY$
'
' Returns long_key_press as -1 if a key is held down.
'
'
' VARIABLE TABLE
' keyin_lkp$: INKEY$ input variable
' long_key_press: Returns a value of -1 i a key is held.
' lockoutkey: 0 = Repeat on long key press / -1 Limit to one event and resets long_key_press to 0 so events triggered by -1 stop. / 1 Limit to one event as long as key is down but continues sending -1 value for long_key_press.
' lockoutkey$: Records the current key down and communicates with lockout key.
' last_key$: Records previous key press.
' press_timer1: When diference between press_timer2 > .1 triggers key_up_down evaluation. Resets to TIMER when triggered.
' press_timer2: Begins as soon as any key is pressed.
' key_up_down_timer: Begins when key held down is detected by last_key$. When < .1 sets long_key_press as TRUE.
' lkp_timer: Used in conjunction with lockoutkey to detemine release state.
'
'
' LONG KEY PRESS DEMO USING INKEY$
'
' Returns long_key_press as -1 if a key is held down.
'
' Stand alone routine
'
' Remove a remark below to use in gosub and sub calls.
'
' GOTO gosub_type
' GOTO sub_type_no_static
' GOTO sub_type_static
'
' -------------------------Long Key Press Stand Alone Routine--------------------------
'
' lockoutkey {0,-1,1}
' 0 = repeat on long key press.
'-1 disallow repeat and reset long_key_press to 0 even if key remains down.
' 1 disallow repeat and hold value at -1 until key is released.
'
lockoutkey = 0
'
press_timer1 = TIMER
key_up_down_timer = TIMER
lkp_timer = TIMER
' Display key status for demo. -1 indicates a long key press.
LOCATE 1, 1
PRINT "long_key_press =";
'
WHILE -1
   LOCATE 1, 18
   PRINT long_key_press;
   b$ = INKEY$
   IF b$ <> "" THEN
      press_timer2 = TIMER
      IF b$ = last_key$ THEN
         IF long_key_press OR lockoutkey$ = b$ THEN
            IF long_key_press THEN
               IF lockoutkey THEN lkp_timer = TIMER
            END IF
         ELSE
            IF ABS(press_timer2 - press_timer1) > .1 THEN
               IF ABS(TIMER - key_up_down_timer) < .1 THEN
                  long_key_press = -1
                  IF lockoutkey THEN
                     lockoutkey$ = b$
                  END IF
                  lkp_timer = TIMER
               END IF
               press_timer1 = TIMER
            END IF
            key_up_down_timer = TIMER
         END IF
      ELSE
         ' Reset values
         press_timer1 = TIMER
         key_up_down_timer = TIMER
         lkp_timer = TIMER
         long_key_press = 0
         lockoutkey$ = ""
      END IF
      last_key$ = b$
   ELSE
      IF long_key_press THEN
         IF ABS(lkp_timer - TIMER) > 1 THEN
            ' Reset values
            press_timer1 = TIMER
            key_up_down_timer = TIMER
            lkp_timer = TIMER
            long_key_press = 0
         END IF
      ELSE
         IF ABS(lkp_timer - TIMER) > .25 AND lockoutkey$ <> "" THEN
            lockoutkey$ = ""
         END IF
      END IF
   END IF
WEND

-----------------------------------------------------------

Pete

Posted on Oct 20, 2014, 11:38 AM

Respond to this message   

Return to Index


i'm confused, i thought this was a mouse issue, not keyboard...

by dibmn (no login)

when a position at x,y is held for a "long press" it makes up for the fact that there is no way to "right click" a touchscreen. i think it even returns the equivalent of a right click.

but this is a mouse issue. you're emulating it with the keyboard? that's cool, but does it work out when you use it on your phone? i guess that's really what matters here.

Posted on Oct 20, 2014, 12:33 PM

Respond to this message   

Return to Index


I converted a modiied version to lean a little more about my Android device.

by Pete (no login)

The results demonstrated a different behavior, at least in Android-BASIC. INKEY is polled and released without repeat. You have to physically press the key again to emulate a held keypress in QB. There may be a keyboard repeat option I need to turn on.

Also, to OS appears as if it may pass along the results of the key press length, as alternate characters appear if the key is held slightly longer in the BASIC program, without a need to assign a variable for the task. That;s pretty neat. Interesting too that the elapsed time can be all over the place, yet the alternate or standard key input is constant in regard to the length o the press. There apparently is no way to measure that in the program.

Pete

Posted on Oct 20, 2014, 2:09 PM

Respond to this message   

Return to Index


try the mouse routines, really

by mn (no login)

android is arm, there is x11 (the graphics layer, not the basic version) for android, there are versions of gnu/linux for the same hardware (rarely but sometimes) and in x11, this is mouse stuff.

i can't comment on dalvik (android vm layer) or android itself, only on similar platforms for the same hardware. in those, the long-press isn't done through timing, it's abstracted as a right-click. this sometimes requires changes to the x11 configuration file, but not necessarily the software itself.

the first thing i would try is to see how a right mouse click is detected in your version of basic. then run that on android and see if a long press gets detected as a right click.

but i still don't understand how inkey$ would pick up a touch event, unless the mouse events are (like they are with some versions of basic) handled by the dialect's version of inkey$. i'm not against inkey$ being overloaded with mouse events, the only issue is that it makes this matter a little more confusing.

i have an android device, and somewhere, a charger for it. mobile may well be the future, but not for me, as long as my choices are limited to android, ios and windows. i've had at least $1000 worth of android-compatible devices, i won't buy another android device if i can help it. if android-x86 continues to progress, maybe i'll be able to setup a test environment.

Posted on Oct 20, 2014, 2:54 PM

Respond to this message   

Return to Index


you know, you never explained what the long-press was needed for

by mn (no login)

if you've got an existing gui with right-click functionality, the easiest translation of the right click on a touchscreen is long-press.
it's only used rarely though, because most functionality on a touchscreen is mac-single-button-like.

(plus there's swipes, aka drag and drop, which in this context is easier than long press.)

why isn't long-press usually a keyboard thing? because keyboards have shift keys, and touchscreens don't.

i used a high-quality, larger-sized, name-brand smartphone with android (at least 4) over roughly a year period. most time a long-press is needed, it's because there aren't enough buttons at the bottom 2 or 3 "we use these for everything" icons. long-press hasn't got much going for it.

it's understandable to want long-press functionality, but what would you use it with? you might be better off sticking with normal presses and (on a touch screen, mind you) little boxes that say "are you sure?" perhaps with less inane wording like "click to confirm," etc. ...still curious. i can imagine some clever applications of long-press, but i'm probably not going to be the one to unleash those on the world.

Posted on Oct 21, 2014, 8:33 PM

Respond to this message   

Return to Index


Re: you know, you never explained what the long-press was needed for

by Pete (no login)

My Android has the ability to hold a key for 300 ms and it will give you the alternate character, which would otherwise need the alt key to be pressed, first. The problem is that it appears to be OS regulated, so no luck using the function I created, but it was still fun doing it, and I will find some use for it in other PC applications.

What I was hoping it would do on the Android device was allow for a long key press of the arrow left and right key to be a home / end replacement, as the keyboard does not have those options. The obvious reason, touch screen.

Pete

Posted on Oct 21, 2014, 9:26 PM

Respond to this message   

Return to Index


you need a different android keyboard

by mn (no login)

i KNOW what it's like to be old and have someone younger tell you things like they know everything, so just roll your eyes and bear with me. (yes, it's probably something you've already thought of, but just in case):

if you enable 3rd party sources, you can get free-licensed apk's from f-droid.org. they even have an app for searching and installing (by category or name.) there are several android keyboards, free. i used these packages exclusively (i even replaced my homescreen/launcher.)

some android keyboards have an alt key, or a keyboard that has a setting that has an alt key (they allow different-size layouts, the ones with more keys have smaller keys.)

of course when they make an android basic sophisticated enough to create an alternate keyboard, you can make your own. in the meantime, i wouldn't suppose you'd like to make a graphical menu to select these characters from? the menu could be in the shape of a keyboard, and (if we're lucky) copy the character to the clipboard, like charmap. (is there a charmap app?) also: check f-droid for a charmap application. http://f-droid.org

Posted on Oct 21, 2014, 9:38 PM

Respond to this message   

Return to Index


Yep, knew that...

by Pete (no login)

Unfortunately the installation of some of those products has also screwed up the device in general, or so I have read. I could always to a factory rest though.

Posted on Oct 21, 2014, 10:00 PM

Respond to this message   

Return to Index


i'd like to know which ones, so i can warn people in the future

by mn (no login)

i don't expect you to know the names off the top of your head, but i never screwed anything up installing them on a variety of devices.

i didn't test every app though, there are probably 1-200 in the repo, and i haven't checked it in a year.

the keyboard i used was called hackers keyboard, presumably based on the non-malevolent definition of the word. (not to be confused with the hack's keyboard, used to write headlines for cnn.)

uninstalling should be an option on most/all apps.

Posted on Oct 21, 2014, 10:11 PM

Respond to this message   

Return to Index


Using QBasic to generate HTML files

by johng (no login)

Hi, I'm using XP for a platform as it has DOS v5.1(cmd.exe) that enables QBasic v6.22 to work just nicely... now I'm assuming that everyone knows that both data, and, programme files(.bas) can be opened in , of all things, "Wordpad". Okay, well my question is to those of you into "hybrids"... Can these "text" files be used to generate HTML files, and, after learning the No.2 easiest to programme with language, is it just a matter of giving the file an HTML extension in opposition to the .bas extension?... thanks

Posted on Oct 18, 2014, 8:54 AM

Respond to this message   

Return to Index


name change, sorry

by johng (Select Login bitbanger)

didn't realise, no login, now with a login I'm "Bitbanger"... sorry

Posted on Oct 18, 2014, 9:39 AM

Respond to this message   

Return to Index


Re: Using QBasic to generate HTML files

by Pete (no login)

You can change the name of the extension to .html/ The file would then open in your default browser, but it won;t have any html mark up tags, so it will present as one long word-warp line.

Example:

myprog.bas

cls
a$ = "12345"
key$ = "x"
print mid$(a$, 1, 2) + key$ + mid$(a$, 2 + 1, len(a$));"/";
sleep 5
end

Presents as this when named as an html file when opened in a browser:

cls a$ = "12345" key$ = "x" print mid$(a$, 1, 2) + key$ + mid$(a$, 2+1, len(a$));"/"; sleep 5 end

----------------

So at minimal, it is missing the <br> tags that separate the lines.

cls<br>
a$ = "12345"<br>
key$ = "x"<br>
print mid$(a$, 1, 2) + key$ + mid$(a$, 2 + 1, len(a$));"/";<br>
sleep 5<br>
end


Pete

Posted on Oct 18, 2014, 10:36 AM

Respond to this message   

Return to Index


with an addenda...

by bitbanger (no login)

"correspondent"...,
My apologies, when I referred to learning another language, I meant learning the HTML language, Tags 'n all, for the purpose of using in the same situation where:- a ".cpp" programmer, I think it's in Linux, can use their native text editor, or Emacs, or GVim to write program files, using C++, give the file a .cpp extension, and then use the text editor file anywhere up to the Bash Shell. The direction I wish to take is similar, in that, if I were already an HTML programmer, but only had a very programmable QBasic to work with, I wish to output text files written "1 on 1" as HTML program files with a .bas extension, once output and sitting in the IDE, invocation of a DOS routine could change the extension from .bas to .HTML and then return to execution in the QBasic program. I was wondering if this idea has been tried before....?
bitbanger

Posted on Oct 21, 2014, 6:01 AM

Respond to this message   

Return to Index


Anyone else want to jump in and try to explain this?

by Pete (no login)

I just can't seem to figure out what bitbanger is getting at. Write a QB program that generates HTML code is the only thought I seem to come up with.

I know years back I would have liked to have had QB run an HTML page, and have the links and forms in the page be managed by the same QB program that launched it, so when the user clicked a ink or submitted a form, the QB program would generate or load a page or a response. That would be a neat way around programming graphics, which the HTML page would produce.

Possibly bitbanger can post a pseudo-code example, if nobody else gets it, either.

Pete

Posted on Oct 21, 2014, 6:46 PM

Respond to this message   

Return to Index


when you get as little traffic as this, you might as well brute force the answer

by mn (no login)

or at least the next step:

we know he's using wordpad, and basic (qb i think) and wants to use html.

so wordpad can be used to write basic files (.bas) even though i can't imagine why anyone would.

it can be used to print .rtf files, which can be parsed by a basic program (or called from shell to print them out.)

it might be able to save rtf as html, but probably not.

then there's the possibility that he wants to display basic programs as html pages, and there there's pete's graphics output (i used to do that with tables, but divs and now canvas work, the latter probably saves dom resources and changes loading time by an order of magnitude.)

possible input: .txt .bas .rtf .htm
possible processors: -> wordpad -> qb, or qb -> wordpad
possible output: .txt .bas .rtf .htm

(...but we know the output is .htm, so the poison is obviously in the drink in front of me. still, you must have known i would realize that, so the poison is obviously in the drink in front of you!)

this is really about what html can do, even if the language barrier (or alternatively, the attempt to put us on) is not too large an obstacle.

in order of difficulty:

1. basic code can be written in wordpad, and wordpad or basic can turn that into nicely formatted html pages for showing off a basic program

2. wordpad can convert (some) rich text documents to rtf, which can be converted (with wordpad) or parsed with a qb program to make .rtf (a plainttext-based format, that's why rtf) into html (a more modern plaintext format)

3. you can take a basic program, convert it to javascript (with difficulty,) and put that in an html page

so really:

input: .bas
processors: ?????
output: .html

we need to see the .bas file, or we need a better explanation of what the .html file will have in it when it's done.

other than that i think we're wasting our time (but that's ok too.)

(i rehashed some things pete already said. it would have been still more confusing otherwise.)

Posted on Oct 21, 2014, 7:56 PM

Respond to this message   

Return to Index


pseudocode (delete if in violation of hh guidelines)

by mn (no login)

open .bas file
open .same filename minus the bas extension, plus something like "_out", then the html extension
(the _out is to avoid clobbering existing files)

make a loop through the bas file

with each line in the loop:
* convert leading spaces to non-breaking spaces (preserve indents)
* add the html for a line break
* add line to the .html file

end the loop through the file

close both files

if "1 to 1" means more than that, he's going to need to parse rtf. it can be done, but it's a lot more work

(at least some of this is on the faq)

Posted on Oct 21, 2014, 8:11 PM

Respond to this message   

Return to Index


just back

by bitbanger (no login)

Pete,
You're bang-on about the graphics, one of the primary reasons for using HTML in the first place is, how could anybody be satisfied with two shades of eight colors when even the download of the "primary" shade selector system leaves you stunned as you leaf through about a hundred different shades of "blue"...etc., Now as you know, machine code subroutines have their source code converted to chr$() "string" characters and are reloaded back into the QB system as individual string-array-subroutines available for program use, the handiest thing you can do with a language whose op-characters fall within the 0 - 255 range, available for "CALL"ing upon establishing subroutine address by use of the " A = VARPTR$() " & segment command "VARSEG". In these subroutines, presumably, would be 32-bit machine-code, able to access the UMB graphics registers... a-la 32 bit graphics... past this I would be conjecturing as although I have a bit of time up on Basic's of one distro or another, and quite an amount of time on 16-bit machine-code, but on 32-bit, I have a "MASM" IDE in mem.... as I say, any others been this way before...

Posted on Oct 23, 2014, 5:53 AM

Respond to this message   

Return to Index


i think if you want to replace basic with html, you're going to need javascript

by mn (no login)

otherwise the graphics that come out are just going to sit there and do nothing.

then again, css has roughly enough functionality to be turing complete at this point. but i don't know anyone that can convert any basic program to javascript, and css would be much more difficult. there's no solid basic to javascript translator that i know of.

Posted on Oct 23, 2014, 6:37 AM

Respond to this message   

Return to Index


Re: just back

by Michael Calkins (Login MCalkins)
Moderator

Upper Memory Blocks are within the first 1MB of real mode address space, so could be accessed directly from 16 bit real mode.

Don't confuse 24 or 32 bit graphics color depth with 32 bit protected mode code.

If you want easy 24 or 32 bit graphics, have you looked at QB64? http://www.qb64.net/
There are two versions, an older SDL version, and a newer OpenGL/freeglut version.

I've never heard of anyone using QBASIC Call Absolute to run protected mode code. I guess it's possible, but I don't know that anyone has ever done it.

Obviously any binary data can be encoded in text as hexadecimal, base64, or even decimal values...

Regards,
Michael

Posted on Oct 24, 2014, 6:17 AM

Respond to this message   

Return to Index


With some help from mn, trying to determine what you are looking for...

by Pete (no login)

OPEN "mybasic.htm" FOR OUTPUT AS #2
PRINT #2, "<!DOCTYPE html PUBLIC " + CHR$(34) + "-//W3C//DTD HTML 4.01 Transitional//EN" + CHR$(34) + ">"
PRINT #2, "<html>"
PRINT #2, "<head>"
PRINT #2, "<meta content=" + CHR$(34) + "text/html; charset=ISO-8859-1" + CHR$(34) + " http-equiv=" + CHR$(34) + "content-type" + CHR$(34) + ">"
PRINT #2, "<title>QBASIC APPLICATION</title>"
PRINT #2, "</head>"
PRINT #2, "<body>"
'OPEN "MYBASIC.BAS" FOR INPUT AS #1
DO
'do UNTIL EOF(1)
'LINE INPUT #1, a$
READ a$: IF MID$(a$, 1, 3) = "eof" THEN EXIT DO
x1$ = LTRIM$(a$)
x2$ = ""
FOR i = 1 TO LEN(a$) - LEN(x1$)
x2$ = x2$ + "&nbsp;"
NEXT
PRINT #2, x2$ + LTRIM$(a$) + "<br>"
LOOP
PRINT #2, "</body>"
PRINT #2, "</html>"
SHELL _DONTWAIT "mybasic.htm"
END

DATA "CLS"
DATA "FOR i = 1 to 5"
DATA " PRINT #2, i"
DATA " IF i = 5 THEN"
DATA " PRINT #2, Done$"
DATA " END IF"
DATA "NEXT"
DATA "eof"


------------------------

You will have to copy it and indent the code yourself. If I use the formatted text option at this forum, it will not allow the html tags to be seen.

I'll put the spaced data in a separate post, underneath this one.

If you remove the DATA READ statement, and the data, unremark the OPEN file statement, and the DO UNTIL EOF(1), get rid of the other do, and it will take a file of yours called mybasic.bas and open it in your default web browser.

The demo as is will do the same, but use the small program as written in the data statements.

Pete

Posted on Oct 21, 2014, 10:13 PM

Respond to this message   

Return to Index


DATA with spacing to replace in above post.

by Pete (Premier Login iorr5t)
Forum Owner

DATA "CLS"
DATA "FOR i = 1 to 5"
DATA "   PRINT #2, i"
DATA "   IF i = 5 THEN"
DATA "      PRINT #2, Done$"
DATA "   END IF"
DATA "NEXT"
DATA "eof"

Posted on Oct 21, 2014, 10:16 PM

Respond to this message   

Return to Index


*howd you do the spaces?

by mn (no login)

Posted on Oct 21, 2014, 10:17 PM

Respond to this message   

Return to Index


Spaces require formatted text box checked, and...

by Pete (no login)

&nbsp; substituted for every leading space.

I have to use Opera to have the formatted text box option, IE and FF won;t show it, or Photobucket option, I don't know why.

So...

IF a = 0
&nbsp;&nbsp;&nbsp;PRINT a
END IF

...would show up indented if I was posting in Opera with formatted text box checked.

Pete

Posted on Oct 21, 2014, 10:27 PM

Respond to this message   

Return to Index


here pete, try this

by mn (no login)

'''' go ahead and add your w3c stuff if you like

filename$ = "myfile.bas"
'''' this program is public domain

open filename$ for input as #1

'''' remove . (and spaces just because)
f$ = ""
for x = 1 to len(filename$)
one$=mid$(filename$,x,1)
if one$ <> chr$(32) and one$ <> "." then f$ = f$ + one$
next x
f$ = f$ + "-out.htm"

open f$ for output as #2

'''' read and convert
do while not eof(1)
line input #1, ln$

f$ = ""
leading = 1
for x = 1 to len(ln$)
one$=mid$(ln$,x,1)
if one$ <> chr(32) then leading = 0
select case one$
case " "
if leading then f$ = f$ + "&nbsp;" else f$ = f$ + chr(32)
case "<"
f$ = f$ + "&lt;"
case ">"
f$ = f$ + "&gt;"
case "&"
f$ = f$ + "&amp;"
case "\"
f$ = f$ + "&#92;" ' won't hurt
end select
next x
f$ = f$ + "<br/>"
print #2, f$

loop

close

Posted on Oct 21, 2014, 10:38 PM

Respond to this message   

Return to Index


Re: here pete, try this

by Pete (no login)

I used the same DATA or the myfile.bas, and tested it.

myile.bas

CLS
FOR i = 1 to 5
PRINT #2, i
IF i = 5 THEN
PRINT #2, Done$
END IF
NEXT

myfile-out.html

<br/>
<br/>
&nbsp; <br/>
&nbsp; <br/>
&nbsp; <br/>
&nbsp; <br/>
<br/>

-------------------------

Also, don;t forget, QB requires CHR$(32), not CHR(32). SOME other BASIC languages allow the $ to be dropped.

Pete

Posted on Oct 21, 2014, 10:57 PM

Respond to this message   

Return to Index


*thanks. i do know but stringdollarsign muscle memory after 5 years is gone. don't miss it

by mn (no login)

Posted on Oct 21, 2014, 11:04 PM

Respond to this message   

Return to Index


You needed a CASE ELSE added...

by Pete (no login)

filename$ = "myfile.bas"
'''' this program is public domain

OPEN filename$ FOR INPUT AS #1

'''' remove . (and spaces just because)
f$ = ""
FOR x = 1 TO LEN(filename$)
one$ = MID$(filename$, x, 1)
IF one$ <> CHR$(32) AND one$ <> "." THEN f$ = f$ + one$
NEXT x
f$ = f$ + "-out.htm"

OPEN f$ FOR OUTPUT AS #2

'''' read and convert
DO WHILE NOT EOF(1)
LINE INPUT #1, ln$

f$ = ""
leading = 1
FOR x = 1 TO LEN(ln$)
one$ = MID$(ln$, x, 1)
IF one$ <> CHR$(32) THEN leading = 0
SELECT CASE one$
CASE " "
IF leading THEN f$ = f$ + "&nbsp;" ELSE f$ = f$ + CHR$(32)
CASE "<"
f$ = f$ + "&lt;"
CASE ">"
f$ = f$ + "&gt;"
CASE "&"
f$ = f$ + "&amp;"
CASE "\"
f$ = f$ + "&#92;" ' won't hurt
CASE ELSE
f$ = f$ + one$
END SELECT
NEXT x
f$ = f$ + "<br/>"
PRINT #2, f$

LOOP

CLOSE

-------------------------------------

The CASE ELSE adds the file contents that was missing.

So, looks good. Hopefully between mine and your example, there is something bitbanger can use.

Pete

Posted on Oct 21, 2014, 11:21 PM

Respond to this message   

Return to Index


whew! i so did. so...

by mn (no login)

while we're here, did you get my original note a week or so ago, about my login?

i've been practicing my newer set of keys (they're on this forum, and mostly in the python forum) and my new login is being used regularly.

i (really) don't care if you transfer the linux club to me again or not, i already said you could have those back. (on the other hand, i'm willing if you need that done. haven't seen any spammers in a while, but etc.)

the python forum currently has no mod which is fine, but whatever you do could you activate the r group for dibmn? i'm not sure if i need that to be able to edit my own stuff there.

Posted on Oct 22, 2014, 12:29 AM

Respond to this message   

Return to Index


* youd possibly want to convert <'s in source to & lt; and >'s to & gt; and &'s to

by mn (no login)

Posted on Oct 21, 2014, 8:16 PM

Respond to this message   

Return to Index


Re: Using QBasic to generate HTML files

by Michael Calkins (Login MCalkins)
Moderator

cmd.exe is not DOS. It is the Windows command prompt.

The DOS command prompt is command.com, and runs under ntvdm.

Regards,
Michael

Posted on Oct 24, 2014, 6:18 AM

Respond to this message   

Return to Index


Need help finishing a program

by Haristole craft (no login)

Can someone help me finishing this. We were supposed to write a program where customers are supposed to come in to use some servers. We were given the arrival rate of those customers and it's 4 minutes and and the service time when a customers uses a server is 2.4 minutes. What we need to find out is the average waiting time for customers in the queue before they get serviced to a server. There are 10 servers and 100000 customers are supposed to come in.
Someone started the program but he didn't finish it. The blank space between line 210 and 270 are the missing codes that he didn't finish.

100 DIM C(50) (50 is max number of servers)
110 INPUT S,NSTOP (S,NSTOP = number of servers, customers to be simulated)
120 FOR D=1 TO NSTOP
130 IA= (IA = interarrival time)
140 A=A+IA (A = arrival time)
150 J=0
160 J=J+1 (J = index of server being probed)
170 IF J=S+1 THEN K=K+1 (K = number of customers that are blocked)
180 IF J=S+1 THEN 270
190 IF A<C(J) THEN 160 (C(J) = completion time for server J)
195 AS W = 0
200 X= (X = service time)
205 SX = X + SX + W (Sum of holding times for carried load)
210 C(J)=A+X+W


270 NEXT D
280 PRINT K/NSTOP, SX/A, SW/NSTOP (fraction of customers blocked, utilization, average waiting time)
285 END

Posted on Oct 16, 2014, 3:26 AM

Respond to this message   

Return to Index


Not only are you cheating, you want us to finish it for you?

by Clippy (Login burger2227)
R

[linked image]

Posted on Oct 16, 2014, 5:25 AM

Respond to this message   

Return to Index


*I'll jump on this if you post your own attempt.

by STxAxTIC (no login)

Posted on Oct 16, 2014, 5:41 AM

Respond to this message   

Return to Index


Re: *I'll jump on this if you post your own attempt.

by Haristole craft (no login)

Basic is not my language, because i've never studied it. It's not something i'll even use one day professionally. But i am required to finish this program in this language. I spent a little hours trying to attempt it on my own but i could not arrive at anything. That's why i decided to come here, but it's ok if you don't want to help, although i would really appreciate it if you do.

Posted on Oct 16, 2014, 5:56 AM

Respond to this message   

Return to Index


Nobody gives homework for programming you aren't learning about!

by Clippy (Login burger2227)
R

Go cheat somewhere else!

Posted on Oct 16, 2014, 6:30 AM

Respond to this message   

Return to Index


Re: Nobody gives homework for programming you aren't learning about!

by Haristole craft (no login)

Thank you for reading this anyway. And no, the homework is not about the program. That is one small part of the homework. The class is not even about programming. It's queueing theory. Not too many people know about BASIC nowadays. Now if it was JAVA i would have done it long ago. Anyway, thank you for your input.

Posted on Oct 16, 2014, 6:46 AM

Respond to this message   

Return to Index


Furthermore....

by Solitaire (no login)

The code you are showing is from an antique version of BASIC using line numbers. It's unstructured, and jumps from one line number to another. This is totally obsolete. Where did you get this code?

QBasic is structured and does not require line numbers.

I suggest you write the program in Java, if that's the language you understand, and then use a translator to convert it into a more modern version of Basic.

Posted on Oct 16, 2014, 8:16 AM

Respond to this message   

Return to Index


But where on Google Earth would he find a JAVA to BASIC translator?

by Pete (no login)

It would be nice if things were really that simple, but they are not.

The best advice I can give Mr. Craft.

1) Ignore Clippy.

2) Reread 1 and repeat.

3) Post us some psudo-code like

input number of customers
input number of servers
input interval of time each customer arrives
input interval of time to process each customer on a server

etc...

QBasic works with statements like:

Input "Number of customers: "; noc

where words between quotes get printed to the screen, and the user presses Enter after typing a response. The numerical response then gets assigned to the variable, which I named noc.

After all input is in, use standard calculations to arrive at averages from input.

theanswer = a / b + c / d

etc.

If you don;t have a copy of QBasic, you can go to www.qb64.net. A download of QB64 is available at:
http://www.qb64.net/forum/index.php?topic=6007.0

you could install it, start writing code, and run it to test it. You are always welcome to return her, post what code you have working, pseudo-code you are trying to find how to use in QB, and get help that way.

Pete


Posted on Oct 16, 2014, 9:09 AM

Respond to this message   

Return to Index


Re: But where on Google Earth would he find a JAVA to BASIC translator?

by Haristole craft (no login)

Thank you for taking interest.

I was already thinking of using java, if i couldn't complete the program. And While i'll be deducted some points for not completing it, the main purpose of this assignment is that we developed a theory and we need to know if it's true by checking it with a running simulation program that would calculate the same variables and see if we end up with the same results. Java aside, even Excel can easily do that.


It would seem to calculate the waiting time it would be the completion time of a server after being used minus the arrival time of the coming customer. The completion time i think is calculated on line 210 which is the variable C(J). So the waiting time should be something like: W = C(J) - A (A stand for the arrival time).

After that you need to generate a new completion time which is: service time + the previous completion time then you generate a new customer. For this code, i'm not sure at all how to write it.

I had already installed qb64, Thanks. The solution is there and i think it's easy but i'm just not used to this language.

Posted on Oct 16, 2014, 11:50 AM

Respond to this message   

Return to Index


Translator

by Solitaire (no login)

Try this. It includes a Java to VB (Visual Basic) translator:

http://www.tangiblesoftwaresolutions.com/

Posted on Oct 16, 2014, 4:04 PM

Respond to this message   

Return to Index


as_an_addenda_to_Pete

by bitbanger (no login)

g'day there,
just a quick afterthought on what Pete said about getting QB64, at the same time go to Biblio.com. when you get there (a) have a PayPal account or MasterCard handy, (b) put the following title -: The Waite Group's QBasic Primer Plus, in the search line. You'll be quite amused by the "array"... pricing of the volume goes by the amount of appreciation for what a truly valuable piece of computer programming hard-copy they have in their possession. I've seen from $8 - $80 as a price for this book....
best of luck
bitbanger

Posted on Oct 21, 2014, 6:37 AM

Respond to this message   

Return to Index


The Waite Group...

by Pete (no login)

Interestingly enough, they still try to sell the old QB books. I used to have the dot com name Qbasicforum.com. I held it for awhile, in case N54 ever went under during the recession. Let it go, and I suspect The Waite Group or someone associated to those publishers picked up the domain name, and are using it to hock the books.

Pete

Posted on Oct 21, 2014, 9:19 PM

Respond to this message   

Return to Index


i think my second basic book was from waite

by mn (no login)

definitely worth its waite in paper.

but my first book was this: http://www.pinterest.com/pin/388294799093230186/

that's the one i modeled my tutorial after. the one that's not by clippy, even though it appears to be in the headings on the downloads page...

i say "modeled," but but i hadn't seen it in 15 years when i wrote the tutorial. i didn't know input$ OR inkey$ until i had the waite book, and i still used gw-basic (though ibm didn't call it that) when i got the waite book.

Posted on Oct 22, 2014, 12:38 AM

Respond to this message   

Return to Index


The only thing missing is finding the sum SW for the total witing time

by qbguy (no login)

Isn't it just

SW = SW + W

since W holds the waiting time?

Posted on Oct 16, 2014, 9:39 AM

Respond to this message   

Return to Index


Re: The only thing missing is finding the sum SW for the total witing time

by Haristole craft (no login)

Thank you also for taking interest.

Yes, this code is needed to find the sum of the waiting times but it doesn't complete the program.

As i just explained to Pete. First i need to the find the waiting time for each customer and that is the completion time when a sever is finished being used minus the arrival time of the coming customer. The completion time is on line 210, so it's something like W = C(J) - A.

The next step that looks more completed to me is when we have to generate the new completion time when a customer come using a server and it should be: service time + the previous completion time. But I don't know how to write that.

Posted on Oct 16, 2014, 12:02 PM

Respond to this message   

Return to Index


Re: Need help finishing a program

by Pete (no login)

Fixed variables

10 Servers
100000 projected users

(Sounds like Obamacare launch, but I digress...)

4 minutes average time elapsed until a new new user signs on.
2.4 minutes per user on a server.

So the problem I have with this scenario, program aside, is it would only require 1 server, as a person shows up every 4 minutes, but gets done 1.6 minutes before the next person even shows up. If that is so, there is no waiting time or anyone in the queue.

Am I missing something?

Pete

Posted on Oct 16, 2014, 1:15 PM

Respond to this message   

Return to Index


Re: Need help finishing a program

by Haristole craft (no login)

Oh, yea sorry i didn't mention about that, because i didn't think it was necessary. And i didn't want to complicate it more for you guys. But we're using 4 methods when we run the program. 1) A Poisson arrival time with an exponential service time (so the time between each arrival is exponentially distributed). 2) Poisson arrival with constant service time. 3) constant inter-arrival time with exponential service time, then 4) constant inter-arrival time with constant service time.

The last method with just the constant 4 and 2.4 minutes will give you no waiting at all.

Posted on Oct 16, 2014, 2:00 PM

Respond to this message   

Return to Index


And the winner is, Android-BASIC.

by Pete (no login)

At least in a race between RFO-BASIC and X11-BASIC, Android-BASIC appears to be the most QB compatible. X11 looked promising, but I couldn't get over the bug in the text screen. Weird, but it locates the cursor one space down and two spaces forward. You actually have to set variables to the row and column and subtract one from each after any print statement followed by a ";" sign. What a pain. Alos weird is the call the variables CRSLIN instead of CSRLIN, and CRSCOL for POS(0). X11 is also missing a way to read from the screen. Android-BASIC has a screen reading function, and uses CSRLIN and POS(0) but in reverse order, as in COLUMN, ROW instead of ROW, COLUMN. It has some drawbacks. It actually assigns line numbers, so I'm glad I hardly ever use GOTO. It also requires, as all 3 do, you separate statements completely. No colons. Every IF statement has to have an ENDIF. No blank lines allowed. Don;t even think about including a keyword as part of a longer variable name, it won't accept it. TIMER is similar but all integers. It just moves faster, so .4 would be 400. None of the ones mentioned have ways to manipulate the cursor appearance. Android-BASIC only supports WHILE/WEND for loops. INKEY$ has some interesting values, like 12 for backspace, 29 cursor left, 28, cursor right, etc.

So a lot to consider to make a conversion program. It makes me appreciate what an advanced BASIC language QB is.

Pete

Posted on Oct 15, 2014, 7:56 PM

Respond to this message   

Return to Index


it's not easy at all to make a good language

by mn (no login)

my approach has been to do mostly the easy stuff first, then try to add what has to be there. i'm not sure it will get there, but like the last one or two toy languages it's good experience (i've coded more in the past week than in the past 6-8 months.)

i thought i'd be making it easier having it based on simple tokens. the fact is, a minimal amount of punctuation in the syntax would make it easier to accomplish certain things, like figuring out whether to treat something as an array or a string (usually no problem, only ideally i want statements that treat them as equal citizens.)

as for the locate bug, i can tell you i've been there. when i started working with ansi, it was a nightmare. the equivalent of print ""; is vital (i can do that now, it's a big deal) and yes, it's definitely a huge difference to be able to fit more than one command per line.

not every language does, of course. logo, which i consider a "pre-beginner" language, has simple tokens, very minimal punctuation in the syntax, and typically one-statement-per-line. i say typically meaning almost always; it's not like the laws of physics. logo dialects vary widely, and also not as much as basic dialects. python lines really benefit from having not so many side (and really do more per line anyway) but you still have the option.

the simpler your dialect's lines are to compose, the more you will need. but the more elegant your dialect's lines are, the fewer you will need before you realize you're done. there's not a lot of elegance out there, and qb wasn't the least-curmudgeonly dialect ever. i think it's still better than most dialects... it's difficult, really really difficult, to make a good language. being galleon helps sometimes, but honestly -very- few things are as easy as qb.

Posted on Oct 15, 2014, 8:16 PM

Respond to this message   

Return to Index


*hey, give me this though... the locate commands seem to work :)

by dibmn (no login)

Posted on Oct 15, 2014, 8:35 PM

Respond to this message   

Return to Index


locate has options

by mn (no login)

something like locate r, c, 1 to turn the cursor on <br/>locate r, c, 0 to hide it. <br/> <br/>there was a cursorheight parameter... possibly more commas on locate

Posted on Oct 15, 2014, 3:02 AM

Respond to this message   

Return to Index


*this was supposed to go under the bowling post

by mn (no login)

Posted on Oct 15, 2014, 3:02 AM

Respond to this message   

Return to Index


But if it were up to Steve...

by Pete (no login)

LOCATE [row], [column], [cursor], [start, stop], [blink-rate], [color], [last row], [last column], [character under cursor], [car payment], [time and temperature], [eye color], [heart rate], [current episode of Scooby Doo], [local pizza delivery near you]

Anyway, I have so enjoyed the QB LOCATE [row], [column], [cursor], [start, stop] statement. In several of my apps I needed to hide, show, or change the cursor shape, and those extra parameters, past row and column, helped a ton. What I am noticing now is mobile BASIC languages lack some of the Stevieness of QB, for example, LOCATE only has row and column parameters. So, I made a substitute in all BASIC code for possible use with those.

Manipulating the cursor in a mobile device might be possible with calls to the bios. I noticed qbguy posted that for PC usage. Mobile is definitely an odd angry bird. Some mobile keyboards use chr$(127) for backspacing, instead of chr$(8). Some don't have arrow controls. Escape key? Ha!

So the previous post with the cursor code a suitable solution if a bios call won't work in my android device. Also, the anti-Steve taking statement features away from the language was a fun bonus. I will have to get to work on stripping out that nasty 3rd parameter of MID$() in QB next!

Pete

Posted on Oct 15, 2014, 7:34 AM

Respond to this message   

Return to Index


If you are going mobile, you are not gonna need the pizza delivery app

by Clippy (Login burger2227)
R

You may need the PPS (Pizza or pepperoni positioning satellite) app however.

Steve's a farmer who tries to scare people on his farm this time of year...

What's SCARY is that he gets tax deductions for it...

[linked image]

Posted on Oct 15, 2014, 8:33 AM

Respond to this message   

Return to Index


LOL, and stop giving Steve ideas! LOCATE ,,,,[keys]

by Pete (no login)

It won't get QB64 on a mobile device any faster, but at least with Steve's new parameter, you will be able to locate your car keys, using your PC, so you can drive out and get pizza!

Pete

Posted on Oct 15, 2014, 8:55 AM

Respond to this message   

Return to Index


Billy Mays here for Steve Away! Or: Let's go bowling with Pete...

by Billy Mays (Premier Login iorr5t)
Forum Owner

Like to bowl? Sure we all do, and now thanks to Steve away, you won't have just 10 pins to knock down, because we are doubling the offer and giving you 20. Know how the cursor parameters were added to QB? Most BASIC languages don't include them, and now you don't have to either. Thanks to just a few squirts of Steve Away, you can have your own cursor sub-routine in your QB programs, and never have to worry about those embarrassing cursor parameters ever again!

CLS
mystring$ = "Press Ins key to change cursor shape: "
startpos = 10
endpos = startpos + LEN(mystring$)
promptline = 5
REM Hide system cursor.
LOCATE promptline, startpos, 0, 7, 1
PRINT mystring$;

WHILE -1
  zcursor1 = TIMER
  ycsrlin = CSRLIN
  xpos = POS(0)
  WHILE -1
      b$ = INKEY$
      IF MID$(b$, 2, 1) = "R" THEN
        ins = ABS(ins) - 1
      END IF
      IF b$ <> "" AND MID$(b$, 2, 1) <> "R" THEN
        IF blinkon THEN
            PRINT replacechr$;
            LOCATE ycsrlin, xpos
        END IF
        IF b$ = CHR$(27) THEN END
        IF MID$(b$, 2, 1) = "K" OR MID$(b$, 2, 1) = "M" THEN
            IF POS(0) > startpos AND MID$(b$, 2, 1) = "K" OR POS(0) < endpos AND MID$(b$, 2, 1) = "M" THEN
              EXIT WHILE
            END IF
        ELSE
            EXIT WHILE
        END IF
      END IF
      zcursor2 = ABS(TIMER - zcursor1)
      IF zcursor2 > .4 OR MID$(b$, 2, 1) = "R" THEN
        blinkon = ABS(blinkon) - 1
        zcursor2 = 0
        zcursor1 = TIMER
        GOSUB cursordisplay
      END IF
  WEND
  SELECT CASE MID$(b$, 2, 1)
      CASE "K"
        PRINT replacechr$;
        LOCATE CSRLIN, POS(0) - 2
        blinkon = -1
        GOSUB cursordisplay
      CASE "M"
        PRINT replacechr$;
        blinkon = -1
        GOSUB cursordisplay
  END SELECT
WEND
END

cursordisplay:
ycsrlin = CSRLIN
xpos = POS(0)
IF blinkon THEN
  replacechr$ = CHR$(SCREEN(ycsrlin, xpos))
  IF ins THEN
      PRINT CHR$(177);
  ELSE
      PRINT "_";
  END IF
ELSE
  PRINT replacechr$;
END IF
LOCATE ycsrlin, xpos
RETURN

-------------------------

Pete

Posted on Oct 15, 2014, 12:20 AM

Respond to this message   

Return to Index


Cursor parameters

by qbguy (no login)

Changing the cursor shape is a BIOS call.

To change the cursor shape, Call int 10h with AH=01h, CH = Scan Row Start, CL = Scan Row End

To change the cursor position, Call int 10h with AH=02h, BH = Page Number, DH = Row, DL = Column

You can use ANSI escape codes:

Hide the cursor: 0x9B 0x3F 0x32 0x35 0x6C
Show the cursor: 0x9B 0x3F 0x32 0x35 0x68

Posted on Oct 15, 2014, 4:24 AM

Respond to this message   

Return to Index


*the kite from 2009 hides the cursor. originally it was a qb program

by mn (no login)

Posted on Oct 15, 2014, 4:36 AM

Respond to this message   

Return to Index


What happened to OBDS?

by angros47 (no login)

Do you remember Open Basic Development System (OBDS), a project by Nekrophidius for a QB-compatible compiler for windows, announced in 2003?

Has it ever been released?

Posted on Oct 14, 2014, 12:31 AM

Respond to this message   

Return to Index


Does anyone have a mirror of old QBasic.com?

by Mark (no login)

I'd like to put back up the old website (Mallard's). I once had a mirror copy of the site, but I can't find it.

I know it's been years, but I bet one of you folks has a backup, right? :)

Posted on Oct 13, 2014, 9:55 PM

Respond to this message   

Return to Index


*matt and i supplied the last copy. he's gone and i didn't keep a copy. good luck.

by anonymous (no login)

Posted on Oct 13, 2014, 10:40 PM

Respond to this message   

Return to Index


*I emailed Matt, found an old gmail address he used. Hope he still checks it.

by Mark (no login)

Posted on Oct 14, 2014, 12:18 AM

Respond to this message   

Return to Index


Have you looked on archive.org?

by angros47 (no login)

Look here:

https://web.archive.org/web/*/http://www.qbasic.com

There are many version of the site, from 1997 to today.

Posted on Oct 14, 2014, 12:27 AM

Respond to this message   

Return to Index


Fully aware of Archive.org.

by Mark (no login)

They don't back up files and often don't keep orphaned pages. I'm looking for a more complete backup.

Posted on Oct 14, 2014, 12:43 AM

Respond to this message   

Return to Index

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement