r/o

running2 c8378acc parent a81869e5

authored by ~talya

πŸ‘€
interp
if/elseif/else/end 8 years ago
πŸ‘€
keyboard
Update README.md 8 years ago
πŸ‘€
.dockerignore
we can let a% = 1 8 years ago
πŸ‘€
.gitignore
local runner 8 years ago
πŸ‘€
COPYING
COPYING 8 years ago
πŸ‘€
Makefile
print prints! 8 years ago
πŸ‘€
Makefile.common
shift pins around to make room for SPI
πŸ‘€
8 years ago
πŸ‘€
README.md
running2 5 years ago
πŸ‘€
at_display.c
flush after print, input str 8 years ago
πŸ‘€
at_display.h
start on INPUT 8 years ago
πŸ‘€
at_main.c
start on new pheap 8 years ago
πŸ‘€
at_main.h
refine 8 years ago
πŸ‘€
avrbasic.elf-gdb.py
gdb yo 8 years ago
πŸ‘€
running.jpg
resize 8 years ago
πŸ‘€
running2.jpg
running2 5 years ago
πŸ‘€
u8g2.h
move to c 8 years ago
πŸ‘€
u8g2_box.c
move to c 8 years ago
πŸ‘€
u8g2_buffer.c
move to c 8 years ago
πŸ‘€
u8g2_d_memory.c
move to c 8 years ago
πŸ‘€
u8g2_d_setup.c
move to c 8 years ago
πŸ‘€
u8g2_font.c
move to c 8 years ago
πŸ‘€
u8g2_fonts.c
move to c 8 years ago
πŸ‘€
u8g2_hvline.c
move to c 8 years ago
πŸ‘€
u8g2_intersection.c
move to c 8 years ago
πŸ‘€
u8g2_ll_hvline.c
move to c 8 years ago
πŸ‘€
u8g2_setup.c
move to c 8 years ago
πŸ‘€
u8x8.h
move to c 8 years ago
πŸ‘€
u8x8_8x8.c
move to c 8 years ago
πŸ‘€
u8x8_byte.c
move to c 8 years ago
πŸ‘€
u8x8_cad.c
move to c 8 years ago
πŸ‘€
u8x8_d_st7920.c
fix add/get line 8 years ago
πŸ‘€
u8x8_display.c
move to c 8 years ago
πŸ‘€
u8x8_gpio.c
move to c 8 years ago
πŸ‘€
u8x8_setup.c
move to c 8 years ago

README.md

avrbasic

An interactive BASIC interpreter for the ATmega328p.

Re-live your TRS-80 memories with your ATmega. Maybe.

image of it running

image of it running more

I’ll do a hardware diagram and stuff like that soon.

Parts list:

  • ATmega328p
  • ST7920, headers, lots of pin–plug header cables
  • the keyboard in /keyboard, or anything else that uses UART
  • Whatever you use to program and power your AVR

Language description:

  • Integers and strings are supported.
    • Integers are any string of numbers from -32768 to 32767.
    • Strings are any set of characters within double-quotes. No escaping is permitted.
  • Variables are identified by labels ending in % (integers) or $ (strings).
    • Only the first two letters are significant.
    • XY% and XYZ% are the same (integer) variable.
    • XY$ is a (distinct) string variable.
  • Expressions are numbers, strings, labels (variable references), in conjunction with any combination of +, -, *, /, = (equality test).
    • Usual binding order applies. Override with parentheses.
    • Numbers support all operators. Strings only support + and =.
    • Testing equality results in the number 1 (true) or 0 (false) regardless of the operand types.
  • The following statements are supported:
    • LET label = expr β€” assign a variable
    • PRINT expr[, expr …] β€” output any expression
    • INPUT ["MESSAGE",] label β€” get user input
    • IF expr THEN β€” start executing code only if expr is a non-zero integer or non-empty string
    • ELSEIF expr THEN β€” during an IF, if a previous block has not executed, start executing code if expr evaluates as above
    • ELSE β€” during an IF/ELSEIF, if no previous block has executed, start executing code
    • END IF β€” end an IF/ELSEIF
    • [number] stmt β€” store program code at the given line number
    • GOTO number β€” transfer program control to given line during RUN
    • RUN β€” run stored program
    • LIST β€” list stored program code
    • CLEAR β€“ erase stored program (use if pheap runs out)