Тёмный
No video :(

Microsoft Just Open Sourced GWBASIC ! 

EEVblog2
Подписаться 111 тыс.
Просмотров 43 тыс.
50% 1

Microsoft just Open Sourced GWBASIC !
Let's take a look at the 8086 assembly language source code.
1K PIC Assembly language code: • EEVblog #b10000000000 ...
#Microsoft #GWBASIC #OpenSource
Subscribe on LBRY: eevblog.tv
Crypto Donations: www.eevblog.com/crypto-currency/

Опубликовано:

 

20 май 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 297   
@josephcote6120
@josephcote6120 4 года назад
The way I heard the story is that they didn't actually have a running 8080 system. Gates had a DEC-10 at his disposal that used an assembly language called MACRO-10 (MAC files) He wrote macros for each 8080 instruction that fiddles with all the right simulated bits; each with the right name for the 8080 assembler. Then wrote all the code for basic with 8080 instruction names/syntax. Once that was all debugged you could just copy the MAC file off the DEC and put it into an 8080 assembler and with some cleanup of unneeded headers etc, out pops working BASIC. Old time DECSystem-10 programmer here. Loved that machine.
@akallio9000
@akallio9000 4 года назад
Aren't you talking about BASIC for the Altair? The version where Gates whined about thieves and pirates. That was several years before GW-Basic.
@lamelama22
@lamelama22 4 года назад
@@akallio9000 Based on the headers included here a lot of the core of GW-Basic is from that original 1975 version.
@manuell3505
@manuell3505 4 года назад
I remember that masm.com/.exe was pretty default on the early clones. But isn't this just entering a higher language so you can leave most of the abstract hardware-dependent logic? Technically, you can adress everything from withing Basic but it's asking to get lost in a maze. If you want that, better take a C-compiler for direct operations on your physical hardware. I mean, you don't want to make a game with any Basic-version's VGA abilities...
@jamesslick4790
@jamesslick4790 2 года назад
@@lamelama22 Yes. GW BASIC is derived from the Altair version. ALL early Microsoft BASICs have this "root".
@xero110
@xero110 4 года назад
They changed the 'Latest commit' on GitHub to say 38 years ago. 😂
@phil85813
@phil85813 4 года назад
yep someone has a sense of humour!
@bergamt
@bergamt 4 года назад
Who had this square on their Apocalypse Bingo card?
@statinskill
@statinskill 4 года назад
Look at source code a man wrote who would like to see nothing better happen than you and me get a needle full with some mystery injection?
@max_kl
@max_kl 4 года назад
@@statinskill I think your tinfoil hat is a bit too tight
@user255
@user255 4 года назад
@@statinskill What..!?
@pgtmr2713
@pgtmr2713 4 года назад
@@user255 I get it, they're referring to Bill Gates and his comments on vaccines, euthanasia, tracking people with chips and software. Not a conspiracy theory, BUT, not sure everything is presented in the intended context to the conspiracy theorist crowd. Maybe it is. Some states have given over tracing info on some covid people without their permission, to I think it was Foursquare and Facebook. Not saying you should make a hat but keep the tinfoil handy :-)
@johnhansen4794
@johnhansen4794 4 года назад
@@pgtmr2713 - Careful you might get accused of having an open mind.
@billferguson8049
@billferguson8049 4 года назад
Because the 8086 processor accessed memory a word (16 bits) at a time, there was a huge performance for non-aligned (odd) memory addresses. From www.cpu-world.com/Arch/8086.html Data memory - Word data can be located at odd or even byte boundaries. *The processor uses two memory accesses to read 16-bit word located at odd byte boundaries.* Reading word data from even byte boundaries requires only one memory access. Stack memory can be placed anywhere in memory. *The stack can be located at odd memory addresses, but it is not recommended for performance reasons (see "Data Memory" above).* Considering relative memory speed at the time, twice as many memory accesses was a big deal.
@traewatkins931
@traewatkins931 4 года назад
It still is but most of the time people are too sloppy to care.
@okaro6595
@okaro6595 4 года назад
The memory access took four cycles. For example Push register was 10-11 cycles (depending on the source). If it was not word aligned there was 4 cycle penalty. On 8088 there always was the penalty. Especially the 8088 spent most time fetching the code. For example simple ADD reg,reg was 3 cycles but s it was two bytes it took 8 cycles to fetch.
@kensmith5694
@kensmith5694 4 года назад
Also, every memory access needed a trip through the ALU to add the segment register bits into the address. Many 8 bit machines were faster.
@jon9103
@jon9103 4 года назад
@@traewatkins931 luckily most compilers aren't so sloppy.
@EthanBlanton
@EthanBlanton 4 года назад
The alignment concern for 8088 versus 8086 is because an un-aligned access on 8086 gives up the extra speed of the 8086 over the 8088. You're exactly right that the difference is the width of the external data bus. This means that a fetch of a 16-bit value from the stack requires two memory accesses on the 8088, but it requires only one on an 8086 AS LONG AS the stack is 16-bit aligned. If the stack is offset by 8 bits, then the stack fetch must be performed by fetching 8 bits from the "top" of one address and 8 bits from the "bottom" of the next address, and combining the two together. The 8086 will actually "fix up" these unaligned accesses, so the program would run either way, but it would require an extra memory cycle for every stack instruction on an unaligned stack. The only reason to pay the (substantial) price penalty for an 8086 was to get those faster accesses, so it's worth doing the optimization. On the other hand, on the 8088, you might as well save the RAM and allow unaligned access, since you have to do the extra memory fetch no matter what.
@mariobrito427
@mariobrito427 4 года назад
Wow just wow! I still have the original GW Basic manual sitting on my shelf, from one of the earliest computers I owned. Quite a piece of history here.
@darkguardian1314
@darkguardian1314 4 года назад
The book “Hard Drive” by James Wallace and Jim Erickson. It tells the Microsoft story very accurately unlike Pirates Of Silicon Valley.
@CyrusBrinkworthRAS
@CyrusBrinkworthRAS 4 года назад
do we have to wait another 30y fore Win3.1....
@xephael3485
@xephael3485 4 года назад
It's useless garbage code by then... should become public domain
@henrikg1388
@henrikg1388 4 года назад
I believe that Windows 3.1 was actually written in GW-BASIC or a version of it. Not this specific compiler, of course.
@douggale5962
@douggale5962 4 года назад
@@henrikg1388 No. C and assembly. You obviously have never written a 16 bit windows program.
@almerian
@almerian 4 года назад
Now that's a blast from the past! I remember I wrote a GW Basic database program to keep track of my progress and grades during my University years.
@mdijkens
@mdijkens 4 года назад
Wrote a lot of commercial software in the late 80's with PDS 7 & 7.1 Since I knew the whole language and never had to look things up or struggle, I sometimes still use it in the form of QB64 for small projects like conversion/migration utilities :-)
@jamesslick4790
@jamesslick4790 2 года назад
There's lots of times where I need to do something oddly specific (Usually, mathematic) And often whipping up some BASIC code is faster than creating a spreadsheet! Both QB64 and PC BASIC are on my taskbar, LOL.
@MikeBramm
@MikeBramm 4 года назад
I wrote a lot of Basic code for Atari 400s and 800s. I then wrote a bit of assembly code and some machine code because it was so much faster. When I got my first PC, I used QBasic. I then got QuickBasic so that I could compile the code to a stand-alone executable. I sold a lot of software written with compiled QuickBasic. Over the years I've used Pascal, Borland C++, Visual Basic and Visual C/C++/C#, Python. The fun part is discovering what the language is about and how far you can push it. When I get bored, I try another language.
@oldestnerd
@oldestnerd 4 года назад
I did a major project with UCSD Pascal on an Apple III around 1986. Later moved it to IBM Pascal for a PC-AT.
@pixymisa8087
@pixymisa8087 4 года назад
I know you could assemble 8080 code for the 8088, but I suspect they're talking about hand-translation from some sort of pseudo-assembler.
@tomgeorge3726
@tomgeorge3726 4 года назад
Great video Dave, I started in High School using HPBasic with punch cards, Then a form of basic on a "mini-computer" at Uni, it was a 5ft high rack mount machine with a TeleType ASR 33, I think, connected. Stored all your programs on punch tape, great times, made some software to predict Amateur Radio Satellites. Tandy TRS-80 basic, code to select cap and resistor values for LM555 circuits. Then GWBasic and Quick basic. Nice clunky code..... I agree, nice commented assembly code in the source code.
@Wenlocktvdx
@Wenlocktvdx 4 года назад
My start was with Disk Extended Color Basic on the Tandy Color Computer, then GWBasic. Fun stuff
@bertblankenstein3738
@bertblankenstein3738 4 года назад
The basic that came on my CoCo2 was Basic (probably gw) by Microsoft. I never had a disk drive for it. Just the tape drive.
@bertblankenstein3738
@bertblankenstein3738 4 года назад
I think it was a combo of gw basic and extended color basic.
@TRS-Eric
@TRS-Eric 4 года назад
@@bertblankenstein3738 GW BASIC came out in 83. Color BASIC (Basic-69) for the TRS-80/Tandy computers came out a few years earlier.
@TechBench
@TechBench 4 года назад
If you're nostalgic and want to write a few snippets of code in GWBASIC, have a look at PC-BASIC. It runs directly under windows (no need for DOSBox) and gives you the exact environment you were used to with a great online reference manual. Write a few programs with simple music, circle graphics and EGA support! github.com/robhagemans/pcbasic (edit: updated with github link)
@00Skyfox
@00Skyfox 4 года назад
I used Microsoft BASIC at school because they had IBM machines, but at home I used Commodore BASIC exclusively because I had the Commodore 64. There are a lot of similarities and a lot of differences between the two versions.
@stonent
@stonent 4 года назад
MS-DOS came with GWBASIC, IBM DOS used BASIC and BASICA that relied on ROM BASIC that came in their systems. There were some differences, but I don't recall encountering them.
@peterschmidt9942
@peterschmidt9942 4 года назад
Ah, brings back childhood memories learning basic on an IBM clone. When I went to tech to do EE, I used to like writing assembler code in class. Couldn't do it now, but it was fun.
@abrown432
@abrown432 4 года назад
DB is Define Byte, used to reserve space for and define values in the assembly output. DW is Define Word, and so on. Used for things like data structures, strings, variables, etc.
@TheZerohimself
@TheZerohimself 4 года назад
OMG i can't believe you remembered PDS.. I loved the windowed demo's!!!
@stevetobias4890
@stevetobias4890 4 года назад
I remember programming in basic. Also reminds me of starting on the old Tandy before floppy discs were a thing.
@dhpbear2
@dhpbear2 4 года назад
2:55 His thought seems to be incomplete. I'm assuming he means that they could port this over to run on a different 8-bit processor. Also, he's implying that there were 'early' versions of the 8080 to which, they had to translate (?)
@kcinplatinumgaming2598
@kcinplatinumgaming2598 4 года назад
takes me back i spent a lot of my rime writing code in GW-BASIC then moved to BC7 (QBX) and when VBDOS came along I installed that.. ... takes me back .. VBDOS and BC7 were virtually the same until hey introduced the Forms features .. wow nostalgic
@Drew-Dastardly
@Drew-Dastardly 4 года назад
.MAC was the file extension for MACRO 10 running on those old DECs. I guess the translation software referred to took the original .MAC files and generated these 8088 .ASM files from them.
@gordonreeder3451
@gordonreeder3451 4 года назад
Oh yes. I remember writing Assembly cod on a VAX-11/780. IIRC; linking was a separate step.
@kensmith5694
@kensmith5694 4 года назад
In these assemblers, there basically were 3 ways a variable or code label could be declared. 1) "local" or just declaring means that it is only seen in this file. This is unlike C were functions are always public. 2) "public" this means another file could declare it as "external" and then use it. 3) "external" means it is defined in another file. The code can be very modular because you only would make external what you really needed to reference and you would only make public what was valid to use externally. I wrote a fair amount of 8086 assembly way back when. The horrid instruction set was the biggest problem. You would run out of registers a lot and have to keep stuff on the stack.
@mikemike7001
@mikemike7001 4 года назад
The original version Gates and Allen wrote for the Altair in a few weeks or months was probably written in 8088 assembly language and cross-assembled on the PDP-10. Intel would have supplied the assembler. Davidoff may have been recruited to write the math routines (trig functions, etc.) because he had the requisite knowledge and Gates and Allen did not. The code Dave is looking at was presumably hand-translated from the original 8088 code to a "generic assembly language" which was then automatically translated to the native assembly languages of several target processors including the 8086/8088 and perhaps the 6502 and 6800. Personal computers of the day had various processors and operating systems, and Microsoft supplied versions of BASIC for many of them. It represents many more than a few weeks or months of work, possibly by other programmers, who would certainly have retained the original comments crediting Gates and Allen. I still run QuickBASIC programs I wrote long ago, using QB64 (see www.qb64.org/portal/) since neither QuickBASIC 4.5 nor BASIC PDS (copies of which I still have) no longer run under Windows. I occasionally write new code using QB64 when I need something quick and dirty. Back in the day, we bought personal computers to write our own software. In the beginning, little was available off the shelf.
@theannoyedmrfloyd3998
@theannoyedmrfloyd3998 4 года назад
MikeMike Have you tried DOSbox for that QuickBASIC?
@ChrisCebelenski
@ChrisCebelenski 4 года назад
The original 4k BASIC was written in 8080 assembly, cross-assembled on the PDP-10 and tested on an 8080 simulator on the same PDP-10. The PDP's were owned by Harvard, where Gates attended. Later Micro-Soft (as they were known at the time) would generate specific versions of their BASIC from the 8080 code, at least for similar processor architects. There were numerous flags throughout the code for machine specific changes. The "Mother" code existed for the major architectures they supported, which were 8080 (8086, etc.), 6502 (various CBM, Acorn etc.), and 6800.
@mikemike7001
@mikemike7001 4 года назад
@@theannoyedmrfloyd3998 Yes, but QB64 uses a more reasonable font and lets you use a mouse in a less clunky way than QuickBASIC. It would be nice to go back to whatever 32-bit version of Windows still let you run QuickBASIC from a DOS prompt. Each "upgrade" of Windows just makes things harder. :(
@kevincozens6837
@kevincozens6837 4 года назад
Wow. 1983 was the year for the release of Turbo Pascal. I bought a copy of it for use on an Apple ][ that I had back in the day. :) I still do some assembly level programming. Currently for 6800, 6809, and 68000. I have an old 1802 based CPU board I'm getting running again and will need to do some assembly programming for it. I never liked the 8086 architecture and its assembly language. In the Letter from Gates I saw mention of versions of APL for the 6800 and 8080. I wonder if they ever got released. I'll have to look in to that.
@harleyarmstrong5947
@harleyarmstrong5947 4 года назад
Hi Dave, The comment about the stack on the 8086, is referring to a decision the designers made, for that particular platform, it may be in contrast to the code for the 8080, or another processor, or the "untranslated" version. It is just saying, instead of packing the stack, we will push an unused byte to the stack while executing the for loop. This way they can use the mov instruction rather than the movb(byte) instruction for better perf. But it wastes stack memory. Hope that makes scene.
@BarackBananabama
@BarackBananabama 4 года назад
I've got my first Made in Taiwan copycat APPLE ][ in December, 1982. I was probably trying to write my first 6502 assembly program in February.
@jeffreyplum5259
@jeffreyplum5259 4 года назад
There was a lot of 8080 to 8086 converters around. CPM86 and early MSDOS were very close to CPM-80 for the 8080 in their low level structures. NEC actually made chips wich run 8080 code as well as 8086 code. An MSDOS machine could then run CPM-80 programs with a software shim. This was all Real-Mode stuff. Later the 386 came out with V86 mode for running MSDOS code under a protected Mode OS. This was the first VM support on PCs. I believe it still lives deep in you 64 bit Intel or AMD fire breather today. I think DosBox and DOSEMU use it on x86 hardware. Remember " 640K is all you Need!!!" Who will write GWBASIC for the Raspberry PI? It is projects like this the old source is really great for. Convert the Routines into a High Level Language, then run it on anything you like. Imagine 64 bit GWBASIC. All those nasty things we worked around back in The Day are gone. Memory limits File name limit, even Path limits are history. Every CPU has floating point built in and almost every high level Language supports it. Building low level frame work to deal with the Console style of the old DOS / CPM world might take work. Graphics might be tricky. Again , our systems can still do it. It is juast getting the old stuff to work through modern features. Have fun and God bless you.
@douggale5962
@douggale5962 4 года назад
8086 had a 16-bit data bus, so it would require two memory access cycles to access a 16-bit value at a misaligned address (the high 8 bits of one word and the low 8 bits of the next word), whereas aligned 16-bit accesses are a single memory access. 8088 had an 8-bit data bus, so alignment was irrelevant, it always takes two memory accesses to access a 16 bit value.
@sandramiller7972
@sandramiller7972 4 года назад
Nice to hear. Where is it? This might be useful! I rewrote my TRS-BASIC to distribute my 1984 PhD program with GW-BASICA. Such historic programs can again be run. Now that the Virtual Box is available to run Windows XP I may be able to get it working again from the original disks I had converted to CD. Maybe an exercise for the students and to do more research? Great; Thanks. F. Miller, Adjunct Computer Sci.
@gigaherz_
@gigaherz_ 4 года назад
The blog post says the translator was to convert from the original instruction set, to the 8086 instruction set. They didn't write it on a higher level. They translated from PDP assembly to x86, using a tool. The blog says sadly they can't opensource this translator.
@pmacgowan
@pmacgowan 4 года назад
Oh the memories ... I stated programming on a PDP11 in basic in 1978
@CassioRogerioEskelsen
@CassioRogerioEskelsen 4 года назад
The initial versions of Delphi were hell because of its data access layer, the Borland Database Engine BDE. 20 years later I still have nightmares about it.
@georgemaragos2378
@georgemaragos2378 4 года назад
I used Turbo Pascal 5, then 5,5. After some time with Delphi and a collection of PC's 286/386/486 Dos, Win 3.1 and Win95 - i said "get some one else to do it, leave me alone with the dos version" - it works fine in a dos window. 5 mins ago i grabbed my box of floppies and a 2546meg usb stick from 20 years ago and they rang in Win 10 on dosbox - plus my old P2 and P4 Regards George
@CyrusBrinkworthRAS
@CyrusBrinkworthRAS 4 года назад
I did play a bit with GWBASIC on my old Atari STE 1024, as you said 30years a go, but you know about ageing diskettes and Atari... as fore a 8MHz computer was really grate!
@petaks01
@petaks01 4 года назад
PDS brings back memories, still have the original box complete with all books and disks hidden somewhere.
@MegaSquiggler
@MegaSquiggler 4 года назад
I wrote hundreds of programs in GWBasic for work in 1987-1991, on a ACT Apricot, MS-DOS but not ibm compatible, you could see the screen write it was so slow! In the end I Hacked D86 debugger to work on the apricot screen (which ran top to bottom in memory) I then re-wrote most of my stuff in assembler, before moving to pc at that point I had a budget and switched to QuickBasic. VBA,Visual Basic continued the trend right up to today!
@danieltkach2330
@danieltkach2330 3 месяца назад
This is great... can you share more about the kind of programs you wrote? I wish I was a programmer back then, but learning all this stuff right now, after three years of JavaScript.
@GeorgeWMays
@GeorgeWMays 4 года назад
As I recall ASM was part of the DOS distribution. The .asm source modules are input to ASM and the output of the assembler was an .obj module ("object code"). One ore more obj's are then linked (using LINK, also distributed with DOS) to form a .com or .exe. Boy, this goes back a long way. As for the 8086/8088 thing, I think they were effectively identical except that the 8088 had an 8-bit data bus and the 8086 has a 16-bit data bus. Please feel free to correct my folks.
@jgurtz
@jgurtz 4 года назад
I was curious which assembler also. I did a little real-mode asm in school and we used MASM, but wasn't sure if that came out later. Also, this code has some different things going on with directives so very curious. Also, no build scripts ...ahem... "batch files" are there. So funny to think if you set everything up in an emulator it would probably all build and link in just a few seconds now!
@stargazer7644
@stargazer7644 Год назад
Microsoft's assembler was called MASM, and never came with any DOS version. It was rather pricey at the time. I don't recall an assembler coming with DOS. GWBASIC/Microsoft BASIC was built for many platforms and CPUs other than the PC.
@ganswijk
@ganswijk 4 года назад
Thanks for this info EEVblog2! I watched it twice and now once again, and looked at the gwmain.asm file on Github and found a wasted byte of binary code: It says AND reg1,reg2 and then DEC and the comment says that it is to set the CC (condition codes=flags), but AND already sets the flags! So the code isn''t perfect, but I still admire it's quality! I wrote a disassembler in Basic on my TRS-80 and figured huge parts of it out. All on paper of course, because printers were way too expensive back then. BTW. the level 2 BASIC interpreter in the TRS-80 was 12 Kbyte of ROM whereas the level 1 was 4K, if I remember correctly. BTW. I'd love to see the source for the 8080/Z80 version of BASIC for the TRS-80, but perhaps that was the same? BTW. the 8088 and 8086 are binary code compatible, but it says somewhere that they added a byte to the stack to make the 8086 with it's 16 bits bus faster.
@adrasx6999
@adrasx6999 4 года назад
It's kinda funny how the changed date on github looks like. It shows that the files were last modified 37years ago. Github didn't even exist back then. It's nice to see a proper repository migration :)
@helmuthschultes9243
@helmuthschultes9243 4 года назад
Yes, I was one of the users of the original MITS ALTAIR 8800 Basic releases, the first BASIC that Bill and Paul released. Had to buy two 4K ram cards at US $795 each, in order to buy their MITS BASIC for an additional US $795. That effectively gave you a 5K image running BASIC with around 3K of code space for your source. Soon added a North Star Floppy disc (5 1/4" about 73K Space per floppy storsge).....etc lots of early history.
@jameslynch8738
@jameslynch8738 4 года назад
That was a pretty penny back then! :)
@helmuthschultes9243
@helmuthschultes9243 4 года назад
@@jameslynch8738 Sure was, after tax monthly income was a bit over Aust$800 that then was actually about over US $800. So say about 2 1/2 months work.
@aamiddel8646
@aamiddel8646 4 года назад
Around the 80ties you could buy a book called: Basic decoded of the TRS-80 model I. This basic was also written by Microsoft.
@grimninja2004
@grimninja2004 4 года назад
gw basic was what my father wrote battery capacity tester using a radio shack multi meter with pc link ( serial) and a 1 aa tape player or toy, it would graph the voltage over runtime and even had fancy voc sound byte for the level warnings. fun times, as a tinker, i always perfered qbasic or ppowerbasic, was so cool making exe';s
@MartinE63
@MartinE63 4 года назад
If baterizer / bateroo gets to hear about any 'battery capacity tester' they'll sue you into oblivion :)
@artemiasalina1860
@artemiasalina1860 4 года назад
I had a TRS-80 color computer in the early 80's which had a 6809 CPU and GWBASIC in ROM. I quickly got OS-9 for that computer as well as an assembly language package. I disassembled the ROM to see how the guts of the computer worked (I think that would be illegal these days). The interesting thing about GWBASIC code was how they would try to save space by intentionally jumping into the _middle_ of multi-byte instructions in order to take advantage of instruction sequences as interpreted from that offset starting point. Must've been hell to maintain that code. I think the name for that technique is called "bad coding."
@jamesslick4790
@jamesslick4790 2 года назад
"Tom Corbett, Space Cadet" was an early 1950s Kid's TV show. Tom Corbett ALSO was the Governor of Pennsylvania from 2011-2015, LOL.
@darkguardian1314
@darkguardian1314 4 года назад
OMG... I just retired a unit using GWBASIC software for a wire bond pull tester yesterday. Been in reliable service since 1992! I was one of the few that remembered how to use DOS and program in BASIC with line numbers. IT only knew GUI. 🤣 I think this was the last project Bill Gates actually did any programming on.
@jamesslick4790
@jamesslick4790 2 года назад
The last commercial product that Bill Gates personally did programming on was Tandy's (Radio Shack) TRS-80 Model 100 "laptop" from 1983. It's an interesting device in it used an Intel 80C85 unlike other TRS-80s that used the Zilog Z-80. Of course it had Microsoft BASIC!
@jethrobo3581
@jethrobo3581 4 года назад
Wow! Memories. Used GWBasic for programs to control HP GPIB test equipment back in mid 80's, however way too slow. Switched to Anders Hejlsberg's Turbo Pascal - huge difference. Has the source code been released for Turbo Pascal? I'd love to graze it!
@georgemaragos2378
@georgemaragos2378 4 года назад
I dont know about the source code, but all the borland programs are now free in their museum. Regards George
@kilrahvp
@kilrahvp 4 года назад
I have an old Epson PX-16 with the large display, an analog/digital interface card and GWBASIC in ROM, I really need to write some kind of datalogger/graph program for it at some point :)
@OliNorwell
@OliNorwell 4 года назад
QBasic was where I got my start - great times...
@tin2001
@tin2001 4 года назад
GW BASIC was very similar, but older... And had a compiler which QBASIC didn't have.
@perfectionbox
@perfectionbox 4 года назад
C# has the safe memory of Basic, and for most projects, compile time is so fast on modern hardware that the benefits of an interpreter don't really matter. One can even get safe memory with stdlib in C++ now.
@tschak909
@tschak909 4 года назад
The canonical Microsoft BASIC code was written in PDP-10 MACRO assembler, which had a massive set of macros to translate to the target microprocessor. The macro package was translated over to Xenix when they retired their PDP-10 from service, and was used until the Xenix systems were retired in the mid '90s.
@tschak909
@tschak909 4 года назад
The lessons learned from doing their language packages (which were all made in the same basic way), carried and evolved over to products like MultiPlan.
@DFPercush
@DFPercush 4 года назад
For RU-vidrs who know basic, the most feared expression is END SUB
@TheEPROM9
@TheEPROM9 4 года назад
I like a good bit of coding these days, only really began to undersand it in uni.
@jamesslick4790
@jamesslick4790 2 года назад
There WERE different versions of ( not counting the IBM versions..) GW-BASIC. IIRC the first version was 1.12, the last was 3.23, The last version of MS-DOS to include it was 4.01, It was replaced in MS-DOS 5 and later with QBasic, a watered down version of "Quick BASIC" (Interpreted only...)
@fnjesusfreak
@fnjesusfreak 4 года назад
There were tools to translate 8080 assembler to 8086 automatically.
@Peter195267
@Peter195267 4 года назад
Brings back memories of the 80's and programming.
@shawns1433
@shawns1433 4 года назад
Didn't an early beta version of dos 6.0 source code get leaked like a decade ago?
@franciscovarela7127
@franciscovarela7127 4 года назад
The assembly looks cleaner than most GW Basic code I wrote oh so many years ago. Most programs consisted of 254 char lines of spaghetti up to the 64Kb limit. And never a comment to be seen.
@SuzuranMajere
@SuzuranMajere 4 года назад
.MAC is the extension for PDP-10 MACRO files. MACRO was DEC's macro assembler. Twenex filenames are DRIVE:FILE.EXT
@atkelar
@atkelar 4 года назад
And here I am just restoring a Commodore PC-I and started GW-Basic yesterday to find this today... what are the odds?
@okaro6595
@okaro6595 4 года назад
They ran the same code, but on 8086 there was performance penalty if things were not word aligned.
@spwim
@spwim 4 года назад
I recently did a project with GW-BASIC for fun, just to get the hang of it. I have an old IBM 5140 laptop here, the IBM convertible and I attached a modern SIM to it using SIM800L I'm sendng an email with my old laptop using the AT command sent towards the SIM800L module through the serial port of the laptop. Fittingly ending all emails with a 'sent from my IBM5140' statement XD
@MonochromeWench
@MonochromeWench 4 года назад
Some of the comments include register names that suggest the original source was probably written for Z80 or 8080. The 8086 comments are probably referring to the differences between 8086 and those ones
@melkiorwiseman5234
@melkiorwiseman5234 4 года назад
I transferred TRS-80 MICROSOFT BASIC to a Dick Smith Electronics "Super-80" computer (kit-built) and re-wrote it to run in that environment. I would have expanded it to use disks, but the price of "real" computers dramatically dropped in the mean time, so it wasn't really worth my while (although it would have been fun). Edit: In GWBASIC, if you needed to save and load an array of numbers of a fixed length (such as you might use for a game which is played within certain boundaries), it was just a case of finding the first array element using VARPTR and calculating the size of the data with some simple muliplications, then you could save or load the entire array with a single BSAVE or BLOAD (Binary Save and Binary Load) command, which took only a fraction of a second. e.g. an array is 10 x 10 (which has 11 elements since arrays start from 0) and a single precision number takes 4 bytes, so the length to either save or load is 11 x 11 x 4 = 484 bytes.
@helmuthschultes9243
@helmuthschultes9243 4 года назад
Must get this GIT Source as I have Basic, Tiny C and other language source for several early programs already.
@MrAwyork
@MrAwyork 4 года назад
Geee Wizz this is awesome
@jhoughjr1
@jhoughjr1 4 года назад
1975 vintage? wonder how it compares to Atari basic with its JIT features. ((which was also a Microsoft basic))
@theannoyedmrfloyd3998
@theannoyedmrfloyd3998 4 года назад
Leggo MuhEggo Atari BASIC is not a Microsoft BASIC variant though the 8-bit Atari did get its own translation of Microsoft BASIC.
@tomwimmenhove4652
@tomwimmenhove4652 4 года назад
I think the reason you don't want to cross word boundaries is that, on a 16 bit bus, it would require 2 operations, whereas if you keep your words aligned, it would take only one.
@EmmittBrownBTTF1
@EmmittBrownBTTF1 4 года назад
Aligning value on even boundaries with an 8086 means the processor interface can fetch or write in a single cycle. if a value appears on an odd boundary or with 8088 two cycles will be required. The relevent comment is addressing how they optimised access to stack values. The extra cycle thing affects all memory accesses, however the stack is used so frequently, the extra cycle can significantly reduce performance.
@springford9511
@springford9511 4 года назад
Re. EEVblog's "stack" comment - I did not look at the code, very rusty, but it's probably word (16 bit) aligning the stack if an 8086. This would likely speed it up quite a bit. 8088 likely wouldn't care. I have some 8086 assembler (the correct term for it, runs equally well on 8088) that I wrote and hand optimised to hell to save every cycle. It has quite a few NOPs in it to Word align the code for efficiency. I neglected to keep the original un-optimised code and I now have something that works but is more or less completely unintelligible. I counted cycles and then tested to verify faster operation. Here is a code fragment EVEN nop ;********** no_wordmatch: xlat ; Load AL with [BX+AL] cmp AL, 19[SI] ;DI] EVEN is an assembler directive to Word align by adding a NOP if required but I then add a NOP myself.This stuff must be more efficient unaligned for reasons I no longer understand.
@ycmdill
@ycmdill 4 года назад
I started writing 8085 Machine Code then Motorola Assembler followed by C, never used Basic.
@jgurtz
@jgurtz 4 года назад
Interesting, my first basic was IBM's Advanced BASIC "basica" on a cartridge in a PCjr running DOS 3.11 lol. Trying to remember if it was QBASIC or GW that I used in the DOS 6.22/Windows 3.11 days but by that time I was more into C.
@drruncmd
@drruncmd 4 года назад
I remember also using gbasic. I dont remember different versions. Just the one but bundled with DOS only?? I learned basic from the zx spectrum. Breaking into game code. Oh!
@SuzuranMajere
@SuzuranMajere 4 года назад
Also, they did "pay" for the time, but not in money; Twenex could "bill" you by processor time, connection time, and disk usage, or any combination of the three. Student accounts at universities were given a limited allotment of those each month, and if you used it up your were out of luck. They "paid" by having less time available for actual course work, which they had to at least pretend to do in order to not lose access to the machine.
@jecelassumpcaojr890
@jecelassumpcaojr890 4 года назад
Note that while they did use the university's PDP-10 for free to develop the demo that they showed to MITS, once they closed the deal and moved to Albuquerque they rented time on a PDP-10 from a local service to finish the product that was then released. So when the letter was written they had indeed spent a lot of actual money. The letter was published in February of 1976 and at that time source code was protected by copyright but binary programs were not. So his threats to sue didn't really worry anybody. That would change just a few months later: en.wikipedia.org/wiki/Copyright_Act_of_1976
@SuzuranMajere
@SuzuranMajere 4 года назад
Seeing x86 instructions in PDP-10 MACRO form is somehow offensive to me. I feel the need for a stiff drink, and I don't drink.
@esra_erimez
@esra_erimez 4 года назад
Agreed
@fwingebritson
@fwingebritson 4 года назад
Yeah, well I am appalled that M$ put bash terminal in windows rather than giving us the full CLI back.
@shawnmccori
@shawnmccori 4 года назад
I started in qbasic went to jbuilder made a minecraft engine that I messed up later. Then C++ and directx then c# now.
@davidlightman3327
@davidlightman3327 4 года назад
This is how I got started writing games in GW basic on a TI-99 (Texas Instruments ) computer AWESOME
@stargazer7644
@stargazer7644 Год назад
The TI-99 did not have GWBasic. It used the built in TI Basic, and Extended Basic if you had the cartridge.
@HungryGuyStories
@HungryGuyStories 4 года назад
I'd love for Borland to release the source for TurboPascal 3.0!
@glaubhafieber
@glaubhafieber 4 года назад
The help function included many code examples. I remember copy/pasting all of them just to see if they work. Years later i tried a pirated copy of visual basic. Lol don’t worry,MS. I have a proper msdn license from work now
@jaredwright5917
@jaredwright5917 4 года назад
I still have some old GW-BASIC 5 1/4 floppies. I used QBasic 4.5 and PDS 7.1 to first learn programming.
@danieltkach2330
@danieltkach2330 3 месяца назад
You mean QuickBasic 4.5. Because QBasic was a different software, and I don't think it reached version 4 not even 3 at all.
@TheDefpom
@TheDefpom 4 года назад
Ooo Basic... hello my old friend.
@RodgerE2472
@RodgerE2472 4 года назад
I started with Atari Basic, then GW and through the rest.
@theannoyedmrfloyd3998
@theannoyedmrfloyd3998 4 года назад
R2472 Even the 8-bit Atari got a Microsoft BASIC variant.
@tasostsimpogiannis7682
@tasostsimpogiannis7682 4 года назад
What's the editor you use?
@DerykRobosson
@DerykRobosson 4 года назад
The title in titlebar of the window is a dead giveaway.
@metallitech
@metallitech 4 года назад
I started on Mallard Basic.
@foxabilo
@foxabilo 4 года назад
Good grief, I remember linking SQL databases to Delphi with ODBC... epic times.
@nosuchthing8
@nosuchthing8 4 года назад
Same here
@randallneikirk6385
@randallneikirk6385 4 года назад
Looks as if BINTRP.MAC was from the DEC BASIC I used in school.
@SuzuranMajere
@SuzuranMajere 4 года назад
RADIX 8 means that all the numbers are octal. PDP-10s are 36-bit octal machines.
@GRBtutorials
@GRBtutorials 4 года назад
1983? That's 37 years ago... a bit late, but OK. How much do we need to wait for Windows 1.0?
@leisergeist
@leisergeist 4 года назад
Neat! If only they released the master and translator, but oh well, still very interesting! Don't think the translator just generated code, probably just created copies and switched out opcodes and stuff for the different CPUs, keeping comments and formatting intact... AFAIK most of the main uPs of the day worked vaguely similarly enough for that to be possible?
@stargazer7644
@stargazer7644 Год назад
What would you do with the translator? Do you have a PDP-10 to run it on?
@leisergeist
@leisergeist Год назад
@@stargazer7644 Moreso just software preservation and archival, etc It seems interesting
@jacobw446
@jacobw446 4 года назад
Serious question.. what is it good for today? I can not think of anything that it is used for in modern electronics, or computers.
@robsrides5851
@robsrides5851 4 года назад
pretty much only good for nostalgia.
@stargazer7644
@stargazer7644 Год назад
What was it good for at the time? It's still good for the same things.
@jacobw446
@jacobw446 Год назад
@@stargazer7644 It was used in a lot of things then.
@guatagel2454
@guatagel2454 4 года назад
My second videogame was written in GWBasic! I was 12.
@kardeef33317
@kardeef33317 4 года назад
I think the 8088 had a 8bit bus and the 8086 had the 16bit bus, I am 90% sure. So anytime memory was accessed on a 8088 it could only access 8 bits at a time that included the stack.. I was 15 at the time. So to push or pop from the stack you would have to send the low and high byte separately and the low and high byte at the memory location would be sent separately. Can't remember if it was big or little indian. Also you could use Pascal and Delphi with C you just had to remember with function calls the arguments were put on the stack in the reverse order. Tis was a long time ago..
@stargazer7644
@stargazer7644 Год назад
The 8088 was a 16 bit processor, but only had an 8 bit data bus. That means 8 bit memory accesses happened in one memory cycle, and 16 bit accesses happened in two cycles (this was transparent to the programmer - it just took longer). The 8086 had a 16 bit data bus, so 8 bit reads and 16 bit word aligned reads both took one cycle. 16 bit unaligned reads took two cycles, and there was great benefit in avoiding this.
@kardeef33317
@kardeef33317 Год назад
@@stargazer7644 been so long I forgot. Laff
@mumblic
@mumblic 4 года назад
8:24 They probably mean the difference between 8086 and 80286 (+later)
@ovalteen4404
@ovalteen4404 4 года назад
The comments must have been copied over from the 8080 code, as they refer to registers like H,L,D,E, etc. Also, 8080 has a PUSH AF instruction that pushes the accumulator and flags together. The 8086/8 version does LAHF (load flags into AH), XCHG AL,AH, PUSH AX (push both AH and AL as a single register) a lot, along with its complementary instructions to restore them, in order to emulate this sequence. Unaligned stack is explicitly allowed on the 8086/8, just like any other unaligned access, but the processor manual also states that there will be a performance penalty. Both 8088 and 8086 multiplex the data and address pins. But the 8088 only uses the lower 8 pins.
@IndependentNewsMedia
@IndependentNewsMedia 4 года назад
Assembler and Machine Code for Motorola MC6800 chip, but never touch Cobolt or Fortan a bridge too far :)
@Albertkallal
@Albertkallal 4 года назад
Keep in mind this is GWBASIC, not QBasic source. QBasic was later on and quite nice. QBasic was based on QuickBasic - same language but did not have the linker and compiler. So, QBasic/QuickBasic was VAST better and nicer then GWBASIC GWBASIC still required each line of code to have a line number. Versions started to have if/then blocks (in place of having to use one line). So, GWBASIC is the pre-cursor to QBasic/QuickBasic, but QuickBasic was a re-write - and not to be confused with GWBASIC. As for this raw assembler? Yes, back then they often used a cross-assembler. So, you could/would write using somewhat of a pseudo instruction set,, and then output the assembler for a given CPU platform. As long as the architecture of the CPU was close, then this was possible. You would then take this output (source file with nice comments) and then run it though an assembler that would convert each 3 letter code to actually byte code, and of course the result is binary code/data without any comments. So this is not the QBASIC source, but only the GWBASIC source code.
@stargazer7644
@stargazer7644 Год назад
Who mentioned QBasic?
@Albertkallal
@Albertkallal Год назад
@@stargazer7644 No one. But if you had experience with dos, then any reference or use of the term basic that was included and packaged with dos often means that many here would thus make the assumption that this basic was and would be the basic included with dos. In other words the basic included with dos was and would be qBasic for a huge number of people watching this video. So to avoid confusion I simply pointed out this difference.
@stargazer7644
@stargazer7644 Год назад
@@Albertkallal I wouldn't call QBasic "the basic that was included ... with dos." In MS-DOS QBasic was only included in versions 5 and 6 for 3 years from 1991 to 1994 and really wasn't nearly as popular at that time as GWBasic/Microsoft Basic was. GWBasic was included in every Microsoft DOS and most OEM DOS versions for 10 years prior to that, and also in quite a few other operating systems and non-pc systems and in derivative forms for 6 years before that. It was everywhere. QBasic was a stripped down version of QuickBasic. QuickBasic was far more powerful and popular as it created compiled executables and ran much faster.
@Albertkallal
@Albertkallal Год назад
@@stargazer7644 I was simple stating that a huge number of people were introduced to Qbasic, and it was installed on their computers. And this occurred during a period of HUGE growth. And QBasic was much the same syntax and code as QuickBasic - just missing the extra parts you noted. So for a whole group of middle school, or even for high school? That is all they knew and saw. Remember, in that 5 year period? (say 1991-1995)? About 160 million PC's were sold. In the previous 5 years (1990-1985)? About half above was sold (about 74 million). So, never stated it was the most popular (do learn to read, will you????). I simple stated that Qbasic was popular, and was installed on a lot of computers. Nothing more, nothing less. No big deal. And looking at the s-curve adoption of computers? yes in that time frame DOUBLE the number of units was sold. In 1984, about 6 million pc's were sold. In 1990, 20 million were sold - MORE then 3 times!!! (and in-between, MANY more units were being sold each year) So, I not sure how many years we have to go back from say a 5 year period in which Qbasic was shipped with dos. In fact, I might even be able to make a case that MORE units were shipped with QBasic, since the explosive growth in our industry occurred about the same time QBasic starting shipping, and it remained that case for some time onwards. I mean, even if we ignore the above math (which we should not!!!)? There are significant groups that were introduced to Qbasic (and its full version), and significant more units were shipping during that time frame then the earlier years of the computer industry. And QBasic continued to ship even during the rapid rise of win 3.1. As I stated, not a huge deal here. But simple that MANY were introduced to QBasic, and that's not the version being talked about here, and it was a simple and fair point I was making.
@stargazer7644
@stargazer7644 Год назад
​@@Albertkallal "do learn to read, will you?" Why don't you learn to listen? The video wasn't about QBasic, and had nothing to do with QBasic. You're the only one jumping up and down about QBasic. For all your claims of units shipped, and explosive growth, QBasic was never that popular. Sure, maybe some middle school kids were taught it because it was free. But I was a programmer using a variety of tools including QuickBasic during this period, and QBasic really wasn't a big thing. And now you want to start talking about Windows when the video was about DOS. VisualBasic is what made Windows a success. It sure as hell wasn't QBasic.
@mr16ga
@mr16ga 4 года назад
Some time I just want a 20 line program to do something simple. I miss having a small basic interpreter of some sort. Now I write small programs in cshell on a unix box.
@rhymereason3449
@rhymereason3449 4 года назад
Why not just use Perl or Awk - both incredibly useful for small programs.
@danieltkach2330
@danieltkach2330 3 месяца назад
You can use basic, I do.
@mr16ga
@mr16ga 3 месяца назад
I like running Solaris using csh shell. I use shell scripts mostly, when I need something that more powerful depending on what I want to accomplish it is C or Fortran for my higher level languages. No matter what I'm writing I lose interest at around one thousand lines of code. I also use Assembly and machine code when I can. I do have a version of Basic that runs on Solaris, it is kind of strange at best. I think I'll go write something using AWK and SED using ED as my editor. VI VI VI the editor of the Beast.
@AGUNGKAYA
@AGUNGKAYA 3 года назад
pls compile the source code and make it available on deb package or rpm package... :D
Далее
GWBasic: Donkey.bas - a game by Bill Gates?
4:12
Просмотров 2,4 тыс.
Mansan oshdi😅
00:22
Просмотров 1,1 млн
Raspberry Pi Pico 2: a RISC-V bet!
8:05
Просмотров 71 тыс.
15kWh AERL LFP Home Storage Battery - First Analysis
32:03
YouTube Promotions Isn't What You Think...
5:17
Mystery Dumpster Teardown - 2020-05-30
12:02
Просмотров 62 тыс.
Altera Software Dongle Teardown
8:12
Просмотров 83 тыс.
Comparing C to machine language
10:02
Просмотров 5 млн
The Clever Way to Count Tanks - Numberphile
16:45
Просмотров 807 тыс.
The Tragedy of systemd
47:18
Просмотров 1,1 млн