Atari BASIC: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica
Nessun oggetto della modifica
Riga 13:
L''''Atari BASIC''' è un [[linguaggio interpretato|interprete]] del [[linguaggio di programmazione]] [[BASIC]] sviluppato per i [[Famiglia Atari 8-bit|computer ad 8 bit]] basati sul [[microprocessore]] [[MOS 6502]] commercializzati da [[Atari, Inc.]] nei primi [[anni ottanta|anni '80]]. L'interprete fu inizialmente distribuito su una [[cartuccia (supporto)|cartuccia]] da 8 [[byte|kB]] di [[Read-only memory|ROM]] e successivamente venne integrato nella memoria dei modelli XL/XLE, che lo caricavano in automatico se il computer veniva avviato senza nessuna cartuccia inserita nell'apposita porta. Il [[codice sorgente]] dell'Atari BASIC, completo di commenti e delle specifiche di progetto, fu pubblicato in un libro nel [[1983]].<ref name="wilko">{{cita libro|cognome=Wilkinson|nome=Bill|anno=1983|titolo=The Atari BASIC Source Book|editore=Compute! Books|id=ISBN 0-942386-15-9}}</ref>
 
 
<!--
==Le origini del linguaggio==
===Da console a computer===
I sistemi che facevano parte della [[famiglia Atari 8 -bit|famiglia di computer Atari ad 8 bit]] furono inizialmente sviluppati come [[console (videogiochi)|console giochi]] per sostituire l'[[Atari 2600]]. Lo sviluppo iniziò subito dopo l'inizio della commercializzazione della console, avvenuta nel [[197]], la cui vita utile era stata calcolata in circa 3 anni. Durante il 1977 apparvero però sul mercato i primi [[microcomputer]] assemblati, quali il [[Commodore PET]], l'[[Apple II]] ed il [[Radio Shack TRS-80]]. [[Ray Kassar]], che nel [[1978]] aveva assunto la presidenza della società, decise che Atari avrebbe dovuto provare ad inserirsi nel mercato dei computer domestici. Ciò comportava non solo rivedere tutti i sistemi trasformandoli in computer ma anche di dotarli del software necessario al loro uso, compreso un interprete del BASIC, il linguaggio di programmazione più diffuso fra il grande pubblico.
 
===Il Microsoft BASIC===
Atari si rivolse quindi alla società che all'epoca produceva l'interprete più diffuso, la [[Microsoft]], per acquistare la licenza del suo interprete [[Microsoft BASIC|Microsoft 8K BASIC]]. La scelta della versione ad 8 kB dell'interprete fu dettata dal fatto che le [[Read-Only Memory|ROM]] di allora avevano quel taglio massimo. Atari si accorse però che il valore di 8 kB presente nel nome della versione dell'interprete fornito per le [[CPU]] [[MOS 6502]] non indicava la dimensione reale del sorgente: il Microsoft BASIC era nato sull'[[Intel 8080]] ed il [[portabilità|porting]] su 6502 aveva fatto lievitare il codice a 9 kB.
<!--
Atari si rivolse quindi alla società che all'epoca produceva l'interprete più famoso, la [[Microsoft]], per acquistare la licenza della versione per la [[CPU]] [[MOS 6502]] del suo interprete [[Microsoft BASIC|Microsoft 8K BASIC]]. Atari si accorse però che gli 8 kB
 
Atari si rese poi conto che doveva espandere il linguaggio per supportare meglio le caratteristiche hardware dei propri computer, come la Apple aveva fatto con il suo [[Applesoft BASIC]]. Questo passaggio incrementò la dimensione dell'interprete fino a 11 kB. A questo problema si sommava il fatto che il sorgente per 6502 del suo interprete non era documentato, cosa che rallentava il lavoro dei programmatori.
Atari did what many of the other home computer companies did: they purchased the [[source code]] to the [[MOS 6502]] version of [[Microsoft BASIC|Microsoft 8K BASIC]], intending to [[Porting|port]] it to run on their new machines. But the name was something of a misnomer, as the 8K referred to its original size on the [[Intel 8080]]'s [[instruction set]]. The lower [[code density]] of the 6502 expanded the code to about 9&nbsp;kB.
 
Lo sviluppo dei computer intanto proseguì e le macchine sarebbero risultate pronte per il debutto al [[Consumer Electronics Show]] (CES) del [[1979]]. La riduzione del codice dell'interprete da 11 a 8 kB stava però dando molti problemi per cui Atari decise di rivolgersi ad un altro produttore di software.
Atari felt that they needed to expand the language to add better support for the specific hardware features of their computers, similar to what Apple had done with their [[Applesoft BASIC]]. This increased the size from 9K to around 11K. Atari had designed their ROM layout in 8K b/locks, and paring down the code from 11K to 8K turned out to be a significant problem. Adding to the problem was the fact that the 6502 code supplied by Microsoft was undocumented.
 
=== Shepardson Microsystems ===
Six months later, they were almost ready with a shippable version of the system. But Atari had a deadline with the [[Consumer Electronics Show]] (CES) approaching and decided to ask for help.
[[File:Basic computing language for Atari 8-bit computers.jpg|thumb|TheLa 8Kcartuccia da 8 kB di ROM dell'Atari BASIC cartridgeper fori computer Atari ad 8-bit computers.bit]]
Nel mese di settembre del [[1978]] Atari contattò la [[Shepardson Microsystems]], che aveva già scritto diversi programmi per gli Apple II (che usavano lo stesso processore dei futuri computer Atari) e che era quasi al termine della scrittura di un BASIC per i computer di [[Cromemco]] basati sul [[S-100|bus S-100]] (il ''Cromemco 32K Structured BASIC''), incaricandola di completare il suo interprete BASIC. Shepardson esaminò il lavoro fin lì svolto e concluse che sarebbe stato più semplice riscrivere da capo un interprete che potesse risiedere in 8 kB di memoria piuttosto che cercare di terminare la riduzione di quello già esistente. Atari accettò la proposta e quando le specifiche del linguaggio furono definite, nel mese di ottobre del 1978, Paul Laughton e Kathleen O'Brien si misero al lavoro sul nuovo interprete.
 
===L'Atari BASIC===
=== Shepardson Microsystems ===
Il risultato fu un interprete del tutto differente, che fu denominato '''Atari BASIC'''. Il nuovo BASIC differiva in particolar modo nella gestione delle [[Stringa (informatica)|stringhe di caratteri]]: mentre il Microsoft BASIC le considerava come costanti, non più modificabili, l'Atari BASIC ne consentiva la modifica, permettendo di incrementare o decrementare le loro dimensioni.
[[File:Basic computing language for Atari 8-bit computers.jpg|thumb|The 8K ROM Atari BASIC cartridge for Atari 8-bit computers.]]
In September 1978 Atari asked [[Shepardson Microsystems]] (SMI) to bid on completing BASIC. Shepardson had written a number of programs for the [[Apple II family]], which used the same 6502 processor, and were in the middle of finishing a new BASIC for the [[Cromemco]] [[S-100 bus]] machines (''Cromemco 32K Structured BASIC''). SMI examined the existing work and decided it was too difficult to continue paring it down; instead they recommended developing a completely new version that would be easier to fit into 8K. Atari accepted the proposal, and when the specifications were finalized in October 1978, Paul Laughton and Kathleen O'Brien began work on the new language.
 
Il contratto stipulato con Atari specificava la consegna entro il [[6 aprile]] [[1979]] dell'interprete funzionante (ed anche di un gestore di file, che in seguito sarebbe stato noto come DOS 1.0). Per coprirsi le spalle Atari decise però di continuare a lavorare sulla riduzione del Microsoft BASIC in modo da averne una prima versione in tempo utile per il CES del 1979, mostrarlo alla fiera e poi passare all'Atari BASIC non appena questo fosse stato completato. Ma i bonus sui tempi di consegna fecero terminare a Shepardson il lavoro prima del tempo per cui Atari decise di portare al CES l'Atari BASIC, visto che era stato completato prima della conversione del Microsoft BASIC.
The result was a rather different version of BASIC, known as '''ATARI BASIC'''. In particular, the new BASIC dealt with [[character string]]s more like [[Data General]]'s BASIC than Microsoft's, which used strings similar to those from [[DEC BASIC]].<ref name="StringDiffs">The main differences were whether strings were allowed to grow and shrink in size once memory had been allocated for them, and whether the size of the string was constant from the outset (e.g. being padded with some special character meaning "[[end of string]]" or whether the size was stored independently. Both approaches have advantages and disadvantages, depending on how one is expecting them to be used.</ref>
<!--
 
===ReleasesVersioni===
The contract specified a delivery date on or before April 6, 1979 and this also included a File Manager System (later known as DOS 1.0). Atari's plans were to take an early 8K version of Microsoft BASIC to the 1979 CES and then switch to the new Atari BASIC for production. Because of a [[bonus clause]] in the contract, development proceeded quickly and an 8K cartridge was available just before the release of the machines. Because Atari BASIC was delivered before Microsoft BASIC, Atari took it with them to the CES.
I programmatori di Shepardson trovarono
 
===Releases===
Shepardson's programmers found problems during the first review and managed to fix some of them, but Atari had already committed ATARI BASIC to manufacturing, and the technology of the time did not permit changes. So it was manufactured with [[known bugs]], and became known (as a [[retronym]]) '''Revision A'''.
*'''Revision A'''&nbsp;&ndash; First Atari BASIC cartridge. 8K [[read only memory|ROM]]. This version contained a bug in a subroutine that copied memory. Under certain conditions, deleting lines of code led to a crash condition known as the "2-line lockup".<ref name=twoline>[http://www.atarimagazines.com/compute/issue74/readers_feedback_10.php "Atari BASIC Bugs"], ''Compute!'', July 1986, pg. 10</ref>