mirror of
https://github.com/Klaus2m5/6502_EhBASIC_V2.22.git
synced 2024-12-25 20:32:29 +00:00
redistribution
The original EhBASIC website is unavailable at this time. This repository restores the availability of the original EhBASIC source and documentation.
This commit is contained in:
commit
54117e62a6
22
.gitattributes
vendored
Normal file
22
.gitattributes
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
|
||||
# Custom for Visual Studio
|
||||
*.cs diff=csharp
|
||||
*.sln merge=union
|
||||
*.csproj merge=union
|
||||
*.vbproj merge=union
|
||||
*.fsproj merge=union
|
||||
*.dbproj merge=union
|
||||
|
||||
# Standard to msysgit
|
||||
*.doc diff=astextplain
|
||||
*.DOC diff=astextplain
|
||||
*.docx diff=astextplain
|
||||
*.DOCX diff=astextplain
|
||||
*.dot diff=astextplain
|
||||
*.DOT diff=astextplain
|
||||
*.pdf diff=astextplain
|
||||
*.PDF diff=astextplain
|
||||
*.rtf diff=astextplain
|
||||
*.RTF diff=astextplain
|
215
.gitignore
vendored
Normal file
215
.gitignore
vendored
Normal file
@ -0,0 +1,215 @@
|
||||
#################
|
||||
## Eclipse
|
||||
#################
|
||||
|
||||
*.pydevproject
|
||||
.project
|
||||
.metadata
|
||||
bin/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~.nib
|
||||
local.properties
|
||||
.classpath
|
||||
.settings/
|
||||
.loadpath
|
||||
|
||||
# External tool builders
|
||||
.externalToolBuilders/
|
||||
|
||||
# Locally stored "Eclipse launch configurations"
|
||||
*.launch
|
||||
|
||||
# CDT-specific
|
||||
.cproject
|
||||
|
||||
# PDT-specific
|
||||
.buildpath
|
||||
|
||||
|
||||
#################
|
||||
## Visual Studio
|
||||
#################
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.sln.docstates
|
||||
|
||||
# Build results
|
||||
|
||||
[Dd]ebug/
|
||||
[Rr]elease/
|
||||
x64/
|
||||
build/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.log
|
||||
*.scc
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
*.ncrunch*
|
||||
.*crunch*.local.xml
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.Publish.xml
|
||||
*.pubxml
|
||||
|
||||
# NuGet Packages Directory
|
||||
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
|
||||
#packages/
|
||||
|
||||
# Windows Azure Build Output
|
||||
csx
|
||||
*.build.csdef
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
|
||||
# Others
|
||||
sql/
|
||||
*.Cache
|
||||
ClientBin/
|
||||
[Ss]tyle[Cc]op.*
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.[Pp]ublish.xml
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file to a newer
|
||||
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
App_Data/*.mdf
|
||||
App_Data/*.ldf
|
||||
|
||||
#############
|
||||
## Windows detritus
|
||||
#############
|
||||
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Mac crap
|
||||
.DS_Store
|
||||
|
||||
|
||||
#############
|
||||
## Python
|
||||
#############
|
||||
|
||||
*.py[co]
|
||||
|
||||
# Packages
|
||||
*.egg
|
||||
*.egg-info
|
||||
dist/
|
||||
build/
|
||||
eggs/
|
||||
parts/
|
||||
var/
|
||||
sdist/
|
||||
develop-eggs/
|
||||
.installed.cfg
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
.coverage
|
||||
.tox
|
||||
|
||||
#Translations
|
||||
*.mo
|
||||
|
||||
#Mr Developer
|
||||
.mr.developer.cfg
|
BIN
Enhanced_6502_BASIC_reference_manual.pdf
Normal file
BIN
Enhanced_6502_BASIC_reference_manual.pdf
Normal file
Binary file not shown.
134
min_mon.asm
Normal file
134
min_mon.asm
Normal file
@ -0,0 +1,134 @@
|
||||
|
||||
; minimal monitor for EhBASIC and 6502 simulator V1.05
|
||||
|
||||
; To run EhBASIC on the simulator load and assemble [F7] this file, start the simulator
|
||||
; running [F6] then start the code with the RESET [CTRL][SHIFT]R. Just selecting RUN
|
||||
; will do nothing, you'll still have to do a reset to run the code.
|
||||
|
||||
.include "basic.asm"
|
||||
|
||||
; put the IRQ and MNI code in RAM so that it can be changed
|
||||
|
||||
IRQ_vec = VEC_SV+2 ; IRQ code vector
|
||||
NMI_vec = IRQ_vec+$0A ; NMI code vector
|
||||
|
||||
; setup for the 6502 simulator environment
|
||||
|
||||
IO_AREA = $F000 ; set I/O area for this monitor
|
||||
|
||||
ACIAsimwr = IO_AREA+$01 ; simulated ACIA write port
|
||||
ACIAsimrd = IO_AREA+$04 ; simulated ACIA read port
|
||||
|
||||
; now the code. all this does is set up the vectors and interrupt code
|
||||
; and wait for the user to select [C]old or [W]arm start. nothing else
|
||||
; fits in less than 128 bytes
|
||||
|
||||
*= $FF80 ; pretend this is in a 1/8K ROM
|
||||
|
||||
; reset vector points here
|
||||
|
||||
RES_vec
|
||||
CLD ; clear decimal mode
|
||||
LDX #$FF ; empty stack
|
||||
TXS ; set the stack
|
||||
|
||||
; set up vectors and interrupt code, copy them to page 2
|
||||
|
||||
LDY #END_CODE-LAB_vec ; set index/count
|
||||
LAB_stlp
|
||||
LDA LAB_vec-1,Y ; get byte from interrupt code
|
||||
STA VEC_IN-1,Y ; save to RAM
|
||||
DEY ; decrement index/count
|
||||
BNE LAB_stlp ; loop if more to do
|
||||
|
||||
; now do the signon message, Y = $00 here
|
||||
|
||||
LAB_signon
|
||||
LDA LAB_mess,Y ; get byte from sign on message
|
||||
BEQ LAB_nokey ; exit loop if done
|
||||
|
||||
JSR V_OUTP ; output character
|
||||
INY ; increment index
|
||||
BNE LAB_signon ; loop, branch always
|
||||
|
||||
LAB_nokey
|
||||
JSR V_INPT ; call scan input device
|
||||
BCC LAB_nokey ; loop if no key
|
||||
|
||||
AND #$DF ; mask xx0x xxxx, ensure upper case
|
||||
CMP #'W' ; compare with [W]arm start
|
||||
BEQ LAB_dowarm ; branch if [W]arm start
|
||||
|
||||
CMP #'C' ; compare with [C]old start
|
||||
BNE RES_vec ; loop if not [C]old start
|
||||
|
||||
JMP LAB_COLD ; do EhBASIC cold start
|
||||
|
||||
LAB_dowarm
|
||||
JMP LAB_WARM ; do EhBASIC warm start
|
||||
|
||||
; byte out to simulated ACIA
|
||||
|
||||
ACIAout
|
||||
STA ACIAsimwr ; save byte to simulated ACIA
|
||||
RTS
|
||||
|
||||
; byte in from simulated ACIA
|
||||
|
||||
ACIAin
|
||||
LDA ACIAsimrd ; get byte from simulated ACIA
|
||||
BEQ LAB_nobyw ; branch if no byte waiting
|
||||
|
||||
SEC ; flag byte received
|
||||
RTS
|
||||
|
||||
LAB_nobyw
|
||||
CLC ; flag no byte received
|
||||
no_load ; empty load vector for EhBASIC
|
||||
no_save ; empty save vector for EhBASIC
|
||||
RTS
|
||||
|
||||
; vector tables
|
||||
|
||||
LAB_vec
|
||||
.word ACIAin ; byte in from simulated ACIA
|
||||
.word ACIAout ; byte out to simulated ACIA
|
||||
.word no_load ; null load vector for EhBASIC
|
||||
.word no_save ; null save vector for EhBASIC
|
||||
|
||||
; EhBASIC IRQ support
|
||||
|
||||
IRQ_CODE
|
||||
PHA ; save A
|
||||
LDA IrqBase ; get the IRQ flag byte
|
||||
LSR ; shift the set b7 to b6, and on down ...
|
||||
ORA IrqBase ; OR the original back in
|
||||
STA IrqBase ; save the new IRQ flag byte
|
||||
PLA ; restore A
|
||||
RTI
|
||||
|
||||
; EhBASIC NMI support
|
||||
|
||||
NMI_CODE
|
||||
PHA ; save A
|
||||
LDA NmiBase ; get the NMI flag byte
|
||||
LSR ; shift the set b7 to b6, and on down ...
|
||||
ORA NmiBase ; OR the original back in
|
||||
STA NmiBase ; save the new NMI flag byte
|
||||
PLA ; restore A
|
||||
RTI
|
||||
|
||||
END_CODE
|
||||
|
||||
LAB_mess
|
||||
.byte $0D,$0A,"6502 EhBASIC [C]old/[W]arm ?",$00
|
||||
; sign on string
|
||||
|
||||
; system vectors
|
||||
|
||||
*= $FFFA
|
||||
|
||||
.word NMI_vec ; NMI vector
|
||||
.word RES_vec ; RESET vector
|
||||
.word IRQ_vec ; IRQ vector
|
||||
|
15
readme.txt
Normal file
15
readme.txt
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
Enhanced BASIC is a BASIC interpreter for the 6502 family microprocessors. It
|
||||
is constructed to be quick and powerful and easily ported between 6502 systems.
|
||||
It requires few resources to run and includes instructions to facilitate easy
|
||||
low level handling of hardware devices. It also retains most of the powerful
|
||||
high level instructions from similar BASICs.
|
||||
|
||||
EhBASIC is free but not copyright free. For non commercial use there is only one
|
||||
restriction, any derivative work should include, in any binary image distributed,
|
||||
the string "Derived from EhBASIC" and in any distribution that includes human
|
||||
readable files a file that includes the above string in a human readable form
|
||||
e.g. not as a comment in an HTML file.
|
||||
|
||||
For commercial use please contact Lee Davison at leeedavison@googlemail.com
|
||||
for conditions.
|
Loading…
Reference in New Issue
Block a user