├── .nojekyll ├── src ├── zxbc │ └── py.typed ├── arch │ └── z80 │ │ ├── backend │ │ └── py.typed │ │ └── optimizer │ │ └── py.typed ├── lib │ └── arch │ │ ├── zx48k │ │ └── runtime │ │ │ ├── sgnf.asm │ │ │ ├── cmp │ │ │ └── lti8.asm │ │ │ ├── sgnf16.asm │ │ │ ├── sgni16.asm │ │ │ ├── sgni32.asm │ │ │ ├── printu16.asm │ │ │ ├── printu32.asm │ │ │ ├── printu8.asm │ │ │ └── bool │ │ │ └── xor16.asm │ │ └── zxnext │ │ ├── runtime │ │ ├── cmp │ │ │ └── lti8.asm │ │ ├── sgnf.asm │ │ ├── sgnf16.asm │ │ ├── sgni16.asm │ │ ├── sgni32.asm │ │ ├── printu16.asm │ │ ├── printu32.asm │ │ ├── printu8.asm │ │ └── bool │ │ │ └── xor16.asm │ │ └── stdlib │ │ └── hmirror.bas └── parsetab │ └── tabs.dbm.dat ├── CNAME ├── tests ├── cmdline │ ├── empty.bas │ └── config_sample.ini ├── functional │ ├── asm │ │ ├── dbbad.bin │ │ ├── divint.bin │ │ ├── ltee12.bin │ │ ├── newl.asm │ │ ├── asmcolon2.bin │ │ ├── asmconst0.bin │ │ ├── asmerror0.bin │ │ ├── end_newline.bin │ │ ├── hex_num.bin │ │ ├── incbin3.bin │ │ ├── incbin4.bin │ │ ├── nop_nop.bin │ │ ├── paren.bin │ │ ├── rel_include.bin │ │ ├── shift.bin │ │ ├── align2.bin │ │ ├── asmprepro.bin │ │ ├── im0.asm │ │ ├── incbin5.bin │ │ ├── ltee11.bin │ │ ├── tmp_label4.bin │ │ ├── tmp_label5.bin │ │ ├── tmp_label6.bin │ │ ├── utf-8-bom-asm.bin │ │ ├── and_err.asm │ │ ├── hex_num1.asm │ │ ├── namespace00.bin │ │ ├── namespace01.bin │ │ ├── nop_nop.asm │ │ ├── rst0.asm │ │ ├── tmp_label0.bin │ │ ├── asmconst0.asm │ │ ├── bitop0.asm │ │ ├── db_multi.bin │ │ ├── dbbad.asm │ │ ├── end_newline.asm │ │ ├── namespace_push_pop.bin │ │ ├── preprocerr2.asm │ │ ├── align3.asm │ │ ├── asmcolon2.asm │ │ ├── asmerror2.asm │ │ ├── db256.bin │ │ ├── defsbad.asm │ │ ├── jr_no_label.asm │ │ ├── ldix1.asm │ │ ├── ldix3.asm │ │ ├── ldix4.asm │ │ ├── asmerror1.asm │ │ ├── bitop1.asm │ │ ├── ldix2.asm │ │ ├── ltee12.asm │ │ ├── tmp_label2.asm │ │ ├── align.bin │ │ ├── divint.asm │ │ ├── tmp_label1.asm │ │ ├── undef_label.asm │ │ ├── asmcolon4.asm │ │ ├── asmlabel1.asm │ │ ├── hex_num.asm │ │ ├── incbin6.asm │ │ ├── shift.asm │ │ ├── asm_wrong_opcode.asm │ │ ├── jp1f_bad.asm │ │ ├── orgbad.asm │ │ ├── preprocerr1.asm │ │ ├── incbin2.bin │ │ ├── ldix.asm │ │ ├── asmerror0.asm │ │ ├── asmlabel2.asm │ │ ├── rel_include.asm │ │ ├── atoloduplbl.asm │ │ ├── db_multi.asm │ │ ├── incbin1.asm │ │ ├── incbin1.bin │ │ ├── neg_par.asm │ │ ├── error_macro.asm │ │ ├── incbin0.asm │ │ ├── incbin2.asm │ │ ├── incbin5.asm │ │ ├── tmp_label5.asm │ │ ├── incbin3.asm │ │ ├── incbin4.asm │ │ ├── ltee11.asm │ │ ├── tmp_label0.asm │ │ ├── align.asm │ │ ├── jphl.bin │ │ ├── ldix.bin │ │ ├── ldix1.bin │ │ ├── opers.bin │ │ ├── orgasm.bin │ │ ├── paren.asm │ │ ├── undoc.bin │ │ ├── asm_lb_ix_rb.asm │ │ ├── asmcolon.bin │ │ ├── hex_num1.bin │ │ ├── init_dot.bin │ │ ├── jp1f_bad.bin │ │ ├── neg_par.bin │ │ ├── prepro35.bin │ │ ├── print42.bin │ │ ├── asmcolon3.bin │ │ ├── asmcolon4.bin │ │ ├── asmlabel1.bin │ │ ├── asmlabel2.bin │ │ ├── asmproc00.bin │ │ ├── asmproc01.bin │ │ ├── asmproc02.bin │ │ ├── asmproc03.bin │ │ ├── asmproc06.bin │ │ ├── asmproc07.bin │ │ ├── constexpr.bin │ │ ├── constexpr2.bin │ │ ├── db256.asm │ │ ├── jphl.asm │ │ ├── namespace02.bin │ │ ├── tmp_label7.bin │ │ └── zxnext_all.bin │ ├── arch │ │ ├── zx48k │ │ │ ├── co.bas │ │ │ ├── 00.bas │ │ │ ├── 02.bas │ │ │ ├── 04.bas │ │ │ ├── 06.bas │ │ │ ├── 21.bas │ │ │ ├── end.bas │ │ │ ├── 03.bas │ │ │ ├── 07.bas │ │ │ ├── 20.bas │ │ │ ├── in0.bas │ │ │ ├── inkey.bas │ │ │ ├── llc.bas │ │ │ ├── print_eol.bas │ │ │ ├── str1.bas │ │ │ ├── 01.bas │ │ │ ├── 05.bas │ │ │ ├── 09.bas │ │ │ ├── 12.bas │ │ │ ├── border00_IC.bas │ │ │ ├── code00.bas │ │ │ ├── codecrash1.bas │ │ │ ├── doloop1.bas │ │ │ ├── eq0.bas │ │ │ ├── lexerr.bas │ │ │ ├── noheap.bas │ │ │ ├── print_tab.bas │ │ │ ├── slice0.bas │ │ │ ├── 27.bas │ │ │ ├── baspreprocerr2.bas │ │ │ ├── code01.bas │ │ │ ├── codecrash2.bas │ │ │ ├── codecrash3.bas │ │ │ ├── dowhile1.bas │ │ │ ├── load03.bas │ │ │ ├── mcleod.bas │ │ │ ├── print_comma.bas │ │ │ ├── print_eol_attr.bas │ │ │ ├── save03.bas │ │ │ ├── simple.bas │ │ │ ├── sna_00.bas │ │ │ ├── stoperr.bas │ │ │ ├── substr_empty.bas │ │ │ ├── substr_empty2.bas │ │ │ ├── tap_00.bas │ │ │ ├── tzx_00.bas │ │ │ ├── unary_crash.bas │ │ │ ├── z80_00.bas │ │ │ ├── 08.bas │ │ │ ├── 10.bas │ │ │ ├── 13.bas │ │ │ ├── 15.bas │ │ │ ├── 16.bas │ │ │ ├── 22.bas │ │ │ ├── 25.bas │ │ │ ├── 26.bas │ │ │ ├── alxinho1.bas │ │ │ ├── bin02.bas │ │ │ ├── chr1.bas │ │ │ ├── code02.bas │ │ │ ├── dountil1.bas │ │ │ ├── mcleod2.bas │ │ │ ├── opt2_nogoto.bas │ │ │ ├── out0.bas │ │ │ ├── print42.bas │ │ │ ├── print64.bas │ │ │ ├── print_at.bas │ │ │ ├── rnd.bas │ │ │ ├── save.bas │ │ │ ├── stdlib_attr.bas │ │ │ ├── stdlib_hex.bas │ │ │ ├── stdlib_pos.bas │ │ │ ├── 17.bas │ │ │ ├── 30.bas │ │ │ ├── bin03.bas │ │ │ ├── data0.bas │ │ │ ├── dimconst6.bas │ │ │ ├── funccall3.bas │ │ │ ├── label_sent1.bas │ │ │ ├── lvalsubstr_nolet.bas │ │ │ ├── opt1_len.bas │ │ │ ├── print_f.bas │ │ │ ├── print_f16.bas │ │ │ ├── print_i32.bas │ │ │ ├── print_i8.bas │ │ │ ├── print_u32.bas │ │ │ ├── print_u8.bas │ │ │ ├── stdlib_SP_Fill.bas │ │ │ ├── stdlib_alloc.bas │ │ │ ├── stdlib_basic.bas │ │ │ ├── stdlib_csrlin.bas │ │ │ ├── stdlib_memcopy.bas │ │ │ ├── stdlib_screen.bas │ │ │ ├── stdlib_scroll.bas │ │ │ ├── 11.bas │ │ │ ├── 28.bas │ │ │ ├── 48.bas │ │ │ ├── abs.bas │ │ │ ├── ataddr.bas │ │ │ ├── bnot32.bas │ │ │ ├── defb.bas │ │ │ ├── dimconst3.bas │ │ │ ├── fornext3.bas │ │ │ ├── label_sent2.bas │ │ │ ├── loadstr.bas │ │ │ ├── math_acs.bas │ │ │ ├── math_asn.bas │ │ │ ├── math_atn.bas │ │ │ ├── math_cos.bas │ │ │ ├── math_exp.bas │ │ │ ├── math_ln.bas │ │ │ ├── math_sin.bas │ │ │ ├── math_sqr.bas │ │ │ ├── math_tan.bas │ │ │ ├── nosub.bas │ │ │ ├── opt1_usr.bas │ │ │ ├── opt2_include_unused.bas │ │ │ ├── print_i16.bas │ │ │ ├── print_u16.bas │ │ │ ├── randomize.bas │ │ │ ├── restore4.bas │ │ │ ├── sgnf.bas │ │ │ ├── sgnf16.bas │ │ │ ├── sgni32.bas │ │ │ ├── sgni8.bas │ │ │ ├── sgnu32.bas │ │ │ ├── sgnu8.bas │ │ │ ├── stdlib_clearbox.bas │ │ │ ├── stdlib_putchars.bas │ │ │ ├── stdlib_scrbuffer.bas │ │ │ ├── stdlib_winscroll.bas │ │ │ ├── usr0.bas │ │ │ ├── 18.bas │ │ │ ├── 29.bas │ │ │ ├── 49.bas │ │ │ ├── 50.bas │ │ │ ├── 51.bas │ │ │ ├── abs16.bas │ │ │ ├── abs32.bas │ │ │ ├── def_func_inline.bas │ │ │ ├── dim_str_error1.bas │ │ │ ├── div32.bas │ │ │ ├── dollar.bas │ │ │ ├── explicit0.bas │ │ │ ├── forline.bas │ │ │ ├── fp_pow.bas │ │ │ ├── id_substr_eq_expr.bas │ │ │ ├── ifempty0.bas │ │ │ ├── label_sent3.bas │ │ │ ├── label_sent4.bas │ │ │ ├── label_sent5.bas │ │ │ ├── ltee8.bas │ │ │ ├── modf.bas │ │ │ ├── modf16.bas │ │ │ ├── mul16c.bas │ │ │ ├── nef.bas │ │ │ ├── nef16.bas │ │ │ ├── nei32.bas │ │ │ ├── nei8.bas │ │ │ ├── neu32.bas │ │ │ ├── neu8.bas │ │ │ ├── paramstr3.bas │ │ │ ├── sgni16.bas │ │ │ ├── sgnu16.bas │ │ │ ├── stdlib_spectranet.bas │ │ │ ├── storef.bas │ │ │ ├── storeu32.bas │ │ │ ├── storeu8.bas │ │ │ ├── substr_expr.bas │ │ │ ├── asm_tokens.bas │ │ │ ├── bin01.bas │ │ │ ├── callable_err.bas │ │ │ ├── def_func_inline_ok.bas │ │ │ ├── dimconst4.bas │ │ │ ├── dimconst4c.bas │ │ │ ├── dimconst5.bas │ │ │ ├── do_crash.bas │ │ │ ├── errletfunc.bas │ │ │ ├── error_array.bas │ │ │ ├── label_sent.bas │ │ │ ├── labelsent.bas │ │ │ ├── lvalue00.bas │ │ │ ├── nei16.bas │ │ │ ├── neu16.bas │ │ │ ├── opt2_letsubstr_not_used.bas │ │ │ ├── opt3_asmexpr.bas │ │ │ ├── print_bool.bas │ │ │ ├── read14.bas │ │ │ ├── restore1.bas │ │ │ ├── storestr0.bas │ │ │ ├── storeu16.bas │ │ │ ├── stradd.bas │ │ │ ├── substrlval.bas │ │ │ ├── tap_01.bas │ │ │ ├── tap_include_asm_error.bas │ │ │ ├── whileempty.bas │ │ │ ├── attr.bas │ │ │ ├── baspreprocerr1.bas │ │ │ ├── cast_i32tou32.bas │ │ │ ├── chr.bas │ │ │ ├── chr0.bas │ │ │ ├── const6.bas │ │ │ ├── dim_str_error0.bas │ │ │ ├── dimconst4b.bas │ │ │ ├── do_err.bas │ │ │ ├── dountilempty.bas │ │ │ ├── elseif1.bas │ │ │ ├── explicit5.bas │ │ │ ├── explicit7.bas │ │ │ ├── fporder.bas │ │ │ ├── idco.bas │ │ │ ├── ifempty1.bas │ │ │ ├── ifempty4.bas │ │ │ ├── ifline.bas │ │ │ ├── let_not_bool.bas │ │ │ ├── letarrstr_substr1.bas │ │ │ ├── macro_under.bas │ │ │ ├── opt1_endtest.bas │ │ │ ├── opt3_endtest.bas │ │ │ ├── poke3.bas │ │ │ ├── poke4.bas │ │ │ ├── recur0.bas │ │ │ ├── restore3.bas │ │ │ ├── substr_expr_err.bas │ │ │ ├── swap32.bas │ │ │ ├── sys_letsubstr0.bas │ │ │ ├── whileempty1.bas │ │ │ ├── 41.bas │ │ │ ├── bad_sigil.bas │ │ │ ├── bin00.bas │ │ │ ├── cast_ftoi16.bas │ │ │ ├── cast_ftoi32.bas │ │ │ ├── cast_ftoi8.bas │ │ │ ├── codecrash4.bas │ │ │ ├── dowhileempty.bas │ │ │ ├── due_par.bas │ │ │ ├── extra_chars.bas │ │ │ ├── file_macro.bas │ │ │ ├── haplo_out.bas │ │ │ ├── ifcoendif.bas │ │ │ ├── ifempty2.bas │ │ │ ├── ifempty5.bas │ │ │ ├── let0.bas │ │ │ ├── let_array_substr6.bas │ │ │ ├── let_array_wrong_dims.bas │ │ │ ├── let_uminus_bool.bas │ │ │ ├── letarrstr_substr0.bas │ │ │ ├── lvalue02.bas │ │ │ ├── opt1_beep_const.bas │ │ │ ├── opt1_shiftli16.bas │ │ │ ├── opt2_ifband.bas │ │ │ ├── opt2_ifbor.bas │ │ │ ├── opt3_ldhlhl.bas │ │ │ ├── poke6.bas │ │ │ ├── pokeref.bas │ │ │ ├── readbug.bas │ │ │ ├── strict2.bas │ │ │ ├── string_substr.bas │ │ │ ├── syntax1.bas │ │ │ ├── valcrash2.bas │ │ │ ├── whiletrue.bas │ │ │ ├── array_err.bas │ │ │ ├── atfunc1.bas │ │ │ ├── atlabel2.bas │ │ │ ├── castF16toF.bas │ │ │ ├── dim_const0.bas │ │ │ ├── draw.bas │ │ │ ├── explicit2.bas │ │ │ ├── explicit4.bas │ │ │ ├── explicit6.bas │ │ │ ├── forempty.bas │ │ │ ├── ifcoendif1.bas │ │ │ ├── ifcoendif2.bas │ │ │ ├── let_array_substr4.bas │ │ │ ├── line_macro.bas │ │ │ ├── lvalue01.bas │ │ │ ├── opt1_shifti16_const.bas │ │ │ ├── opt1_shiftu16_const.bas │ │ │ ├── opt2_incdec_byte.bas │ │ │ ├── opt3_fixed.bas │ │ │ ├── plot.bas │ │ │ ├── poke5.bas │ │ │ ├── refconstparam.bas │ │ │ ├── strict6.bas │ │ │ ├── strict_bool.bas │ │ │ ├── substr_expr2.bas │ │ │ ├── tap_incbin.bas │ │ │ ├── whilefalse.bas │ │ │ ├── 60.bas │ │ │ ├── 61.bas │ │ │ ├── 62.bas │ │ │ ├── add32a.bas │ │ │ ├── add8a.bas │ │ │ ├── aloadstr0.bas │ │ │ ├── arrconst.bas │ │ │ ├── atfunc0.bas │ │ │ ├── coercion3.bas │ │ │ ├── data1.bas │ │ │ ├── dimconst7.bas │ │ │ ├── divf00.bas │ │ │ ├── divf01.bas │ │ │ ├── divi8a.bas │ │ │ ├── divu8a.bas │ │ │ ├── einar01.bas │ │ │ ├── explicit1.bas │ │ │ ├── for_err.bas │ │ │ ├── forsplitted1.bas │ │ │ ├── ifempty3.bas │ │ │ ├── ifemptyelse.bas │ │ │ ├── ifendif.bas │ │ │ ├── iffor.bas │ │ │ ├── lbound0.bas │ │ │ ├── llb.bas │ │ │ ├── ltee3.bas │ │ │ ├── mul8a.bas │ │ │ ├── mulf00.bas │ │ │ ├── mulf01.bas │ │ │ ├── mulf16a.bas │ │ │ ├── opt1_dim_arr_at5.bas │ │ │ ├── opt3_haplo01.bas │ │ │ ├── poke7.bas │ │ │ ├── print_arrstr.bas │ │ │ ├── refconstparam2.bas │ │ │ ├── refconstparam3.bas │ │ │ ├── rel_include.bas │ │ │ ├── save04.bas │ │ │ ├── sn_crash.bas │ │ │ ├── strict.bas │ │ │ ├── sub8a.bas │ │ │ ├── subf00.bas │ │ │ ├── subf01.bas │ │ │ ├── sys_letsubstr1.bas │ │ │ ├── ubound0.bas │ │ │ ├── while_err.bas │ │ │ ├── 70.bas │ │ │ ├── add16a.bas │ │ │ ├── add32b.bas │ │ │ ├── addf.bas │ │ │ ├── addf16a.bas │ │ │ ├── arraycopy5.bas │ │ │ ├── dim_arr_at_label0.bas │ │ │ ├── dim_at_label0.bas │ │ │ ├── dim_at_label5.bas │ │ │ ├── divf16a.bas │ │ │ ├── divi16a.bas │ │ │ ├── divu16a.bas │ │ │ ├── elseif2.bas │ │ │ ├── endif.bas │ │ │ ├── equ32.bas │ │ │ ├── equ8.bas │ │ │ ├── equf.bas │ │ │ ├── forsplitted.bas │ │ │ ├── gti8.bas │ │ │ ├── gtu8.bas │ │ │ ├── ifelse3.bas │ │ │ ├── ifempty6.bas │ │ │ ├── labeldecl.bas │ │ │ ├── lbound1.bas │ │ │ ├── lbound3.bas │ │ │ ├── load02.bas │ │ │ ├── lvalue03.bas │ │ │ ├── modi8a.bas │ │ │ ├── modu8a.bas │ │ │ ├── mul16a.bas │ │ │ ├── opt2_pstr.bas │ │ │ ├── optional_param0.bas │ │ │ ├── refconstparam6.bas │ │ │ ├── restore0.bas │ │ │ ├── save01.bas │ │ │ ├── save02.bas │ │ │ ├── str01.bas │ │ │ ├── strict5.bas │ │ │ ├── sub16a.bas │ │ │ ├── ubound1.bas │ │ │ ├── ubound3.bas │ │ │ ├── 33.bas │ │ │ ├── 64.bas │ │ │ ├── add8b.bas │ │ │ ├── arden2.bas │ │ │ ├── array08.bas │ │ │ ├── byte_neq.bas │ │ │ ├── const_str.bas │ │ │ ├── def_func_inline_for_next.bas │ │ │ ├── dim_at_label1.bas │ │ │ ├── divi8b.bas │ │ │ ├── divu8b.bas │ │ │ ├── doloop4.bas │ │ │ ├── due_crash.bas │ │ │ ├── emptystrparam.bas │ │ │ ├── equ16.bas │ │ │ ├── explicit3.bas │ │ │ ├── forsplitted0.bas │ │ │ ├── gosub_in_func.bas │ │ │ ├── ifelse0.bas │ │ │ ├── iffor1.bas │ │ │ ├── let_array_substr7.bas │ │ │ ├── mul8b.bas │ │ │ ├── octal.bas │ │ │ ├── opt1_arr_at_init.bas │ │ │ ├── opt1_beep_var.bas │ │ │ ├── opt2_ifbyte.bas │ │ │ ├── pokeref1.bas │ │ │ ├── refconstparam5.bas │ │ │ ├── sub8b.bas │ │ │ ├── sys_letsubstr2.bas │ │ │ ├── 32.bas │ │ │ ├── 34.bas │ │ │ ├── 35.bas │ │ │ ├── add16b.bas │ │ │ ├── addf16b.bas │ │ │ ├── array11.bas │ │ │ ├── array12.bas │ │ │ ├── arrlabels2.bas │ │ │ ├── bound00.bas │ │ │ ├── const_str6.bas │ │ │ ├── dim_at_label3.bas │ │ │ ├── dim_dyn_err.bas │ │ │ ├── dim_test0.bas │ │ │ ├── divf16b.bas │ │ │ ├── divi16b.bas │ │ │ ├── divu16b.bas │ │ │ ├── dup_func_decl.bas │ │ │ ├── for0.bas │ │ │ ├── funccall0.bas │ │ │ ├── keyword_arg3.bas │ │ │ ├── let_array_substr10.bas │ │ │ ├── let_array_substr11.bas │ │ │ ├── let_array_substr13.bas │ │ │ ├── let_array_substr3.bas │ │ │ ├── let_array_substr9.bas │ │ │ ├── mul16b.bas │ │ │ ├── opt1_dim_arr_global2.bas │ │ │ ├── opt2_labelinfunc.bas │ │ │ ├── opt2_unused_var1.bas │ │ │ ├── opt4_keepix.bas │ │ │ ├── paramint3.bas │ │ │ ├── str02.bas │ │ │ ├── sub16b.bas │ │ │ ├── substr_err.bas │ │ │ ├── whilefalse1.bas │ │ │ ├── 31.bas │ │ │ ├── aloadstr1.bas │ │ │ ├── array01.bas │ │ │ ├── array04.bas │ │ │ ├── cast_i32tof.bas │ │ │ ├── dim_at_label2.bas │ │ │ ├── dimconst2.bas │ │ │ ├── dimconst2c.bas │ │ │ ├── dimconst2d.bas │ │ │ ├── doloopuntilsplitted.bas │ │ │ ├── dountilsplitted.bas │ │ │ ├── dowhilesplitted.bas │ │ │ ├── due_inc_main.bas │ │ │ ├── einarshift.bas │ │ │ ├── fornextopt3.bas │ │ │ ├── haplo06.bas │ │ │ ├── ifthencoendif.bas │ │ │ ├── ifthencosntcoendif.bas │ │ │ ├── ifthenlblsntcoendif.bas │ │ │ ├── ifthensntcoendif.bas │ │ │ ├── ifwhile.bas │ │ │ ├── init_with_dot.bas │ │ │ ├── keyword_arg0.bas │ │ │ ├── keyword_arg2.bas │ │ │ ├── let_array_substr12.bas │ │ │ ├── let_array_substr2.bas │ │ │ ├── ltee6.bas │ │ │ ├── modi8b.bas │ │ │ ├── modu8b.bas │ │ │ ├── opt2_dim_arr_at1.bas │ │ │ ├── opt2_labelinfunc3.bas │ │ │ ├── optional_param4.bas │ │ │ ├── paramstr4.bas │ │ │ ├── paramstr5.bas │ │ │ ├── refconstparam4.bas │ │ │ ├── restore2.bas │ │ │ ├── storecstr.bas │ │ │ ├── strsigil.bas │ │ │ ├── sub_data.bas │ │ │ ├── utf-8-bom-bas.bas │ │ │ └── whilesplitted.bas │ │ └── zxnext │ │ │ ├── inkey.bas │ │ │ ├── print_f.bas │ │ │ ├── print_i32.bas │ │ │ ├── print_i8.bas │ │ │ ├── print_u8.bas │ │ │ ├── math_ln.bas │ │ │ ├── print_i16.bas │ │ │ ├── print_u16.bas │ │ │ ├── print_u32.bas │ │ │ ├── div32.bas │ │ │ ├── fp_pow.bas │ │ │ ├── math_acs.bas │ │ │ ├── math_asn.bas │ │ │ ├── math_atn.bas │ │ │ ├── math_cos.bas │ │ │ ├── math_exp.bas │ │ │ ├── math_sin.bas │ │ │ ├── math_sqr.bas │ │ │ ├── math_tan.bas │ │ │ ├── modf.bas │ │ │ ├── modf16.bas │ │ │ ├── mul16c.bas │ │ │ ├── muli8.bas │ │ │ ├── mulu8.bas │ │ │ ├── nef.bas │ │ │ ├── nef16.bas │ │ │ ├── nei32.bas │ │ │ ├── nei8.bas │ │ │ ├── neu32.bas │ │ │ ├── neu8.bas │ │ │ ├── mulu16.bas │ │ │ ├── nei16.bas │ │ │ ├── neu16.bas │ │ │ ├── opt1_beep_const.bas │ │ │ ├── add32a.bas │ │ │ ├── add8a.bas │ │ │ ├── divf00.bas │ │ │ ├── divf01.bas │ │ │ ├── divi8a.bas │ │ │ ├── divu8a.bas │ │ │ ├── mul8a.bas │ │ │ ├── mulf00.bas │ │ │ ├── mulf01.bas │ │ │ ├── mulf16a.bas │ │ │ ├── sub8a.bas │ │ │ ├── subf00.bas │ │ │ ├── subf01.bas │ │ │ ├── ubound0.bas │ │ │ ├── add16a.bas │ │ │ ├── add32b.bas │ │ │ ├── addf.bas │ │ │ ├── addf16a.bas │ │ │ ├── divi16a.bas │ │ │ ├── divu16a.bas │ │ │ ├── equ32.bas │ │ │ ├── equ8.bas │ │ │ ├── equf.bas │ │ │ ├── gti8.bas │ │ │ ├── gtu8.bas │ │ │ ├── modi8a.bas │ │ │ ├── modu8a.bas │ │ │ ├── mul16a.bas │ │ │ ├── sub16a.bas │ │ │ ├── add8b.bas │ │ │ ├── array08.bas │ │ │ ├── arraycopy5.bas │ │ │ ├── divf16a.bas │ │ │ ├── divi8b.bas │ │ │ ├── divu8b.bas │ │ │ ├── equ16.bas │ │ │ ├── gei8.bas │ │ │ ├── mul8b.bas │ │ │ ├── opt1_beep_var.bas │ │ │ ├── sub8b.bas │ │ │ ├── add16b.bas │ │ │ ├── addf16b.bas │ │ │ ├── bound00.bas │ │ │ ├── divi16b.bas │ │ │ ├── divu16b.bas │ │ │ ├── mul16b.bas │ │ │ ├── sub16b.bas │ │ │ ├── array01.bas │ │ │ ├── divf16b.bas │ │ │ ├── modi8b.bas │ │ │ └── modu8b.bas │ └── zxbpp │ │ ├── prepro09.bi │ │ ├── prepro51.bi │ │ ├── prepro77.out │ │ ├── prepro00.bi │ │ ├── prepro09.out │ │ ├── prepro29.out │ │ ├── prepro36.out │ │ ├── prepro40.bi │ │ ├── prepro76.bi │ │ ├── prepro01.bi │ │ ├── prepro29.bi │ │ ├── prepro40.out │ │ ├── prepro51.out │ │ ├── prepro52.bi │ │ ├── prepro63.bi │ │ ├── prepro64.bi │ │ ├── prepro71.bi │ │ ├── prepro77.bi │ │ ├── stringizing0.bi │ │ ├── once_base.bi │ │ ├── prepro35.bi │ │ ├── prepro36.bi │ │ ├── prepro42.bi │ │ ├── prepro43.bi │ │ ├── prepro44.bi │ │ ├── line_asm.out │ │ ├── prepro07.bi │ │ ├── prepro30.bi │ │ ├── prepro31.out │ │ ├── prepro34.out │ │ ├── prepro37.out │ │ ├── prepro38.bi │ │ ├── prepro53.bi │ │ ├── prepro42.out │ │ ├── prepro44.out │ │ ├── prepro45.out │ │ ├── prepro46.bi │ │ ├── prepro81.out │ │ ├── stringizing2.bi │ │ ├── prepro31.bi │ │ ├── prepro37.bi │ │ ├── prepro52.out │ │ ├── prepro53.out │ │ ├── prepro85.bi │ │ ├── spectrum.out │ │ ├── once.bi │ │ ├── prepro06.bi │ │ ├── prepro57.bi │ │ ├── prepro59.bi │ │ ├── prepro61.bi │ │ ├── line_asm.bi │ │ ├── prepro63.out │ │ ├── once.out │ │ ├── prepro02.out │ │ ├── prepro06.out │ │ ├── prepro10.bi │ │ ├── prepro28.bi │ │ ├── prepro43.out │ │ ├── prepro46.out │ │ ├── prepro02.bi │ │ ├── prepro20.bi │ │ ├── prepro20.out │ │ ├── prepro25.out │ │ ├── prepro47.out │ │ ├── prepro48.out │ │ ├── prepro49.out │ │ ├── prepro54.out │ │ ├── prepro56.out │ │ ├── prepro57.out │ │ ├── prepro61.out │ │ ├── prepro62.bi │ │ ├── prepro81.bi │ │ ├── stringizing0.out │ │ ├── stringizing1.bi │ │ ├── prepro04.out │ │ ├── prepro18.out │ │ ├── prepro25.bi │ │ ├── prepro26.out │ │ ├── prepro34.bi │ │ ├── prepro38.out │ │ ├── prepro59.out │ │ ├── prepro91.out │ │ └── prepro95.out └── runtime │ ├── Makefile │ ├── expected │ ├── eq8.tzx.scr │ ├── gei16.tzx.scr │ ├── gei8.tzx.scr │ ├── geu8.tzx.scr │ ├── gti16.tzx.scr │ ├── gti8.tzx.scr │ ├── lei16.tzx.scr │ ├── lei8.tzx.scr │ ├── lti16.tzx.scr │ ├── lti8.tzx.scr │ ├── point.tzx.scr │ └── xor.tzx.scr │ └── test_all ├── .coveragerc ├── docs ├── architectures │ ├── ninjawarriors.md │ ├── neogeo.md │ ├── sc3000.md │ ├── adam.md │ ├── coco2.md │ ├── galeb.md │ ├── neogeopocket.md │ ├── pcengine.md │ ├── c128.md │ ├── camputers_lynx.md │ ├── sharpx1.md │ ├── taitof1.md │ ├── sectionz.md │ ├── taitof2.md │ ├── taitof3.md │ ├── taitoh.md │ ├── taitol.md │ ├── taitox.md │ ├── taitoz.md │ ├── apple_ii.md │ ├── capcom1942.md │ ├── capcom1943.md │ ├── segamodel1.md │ ├── segamodel2.md │ ├── segamodel3.md │ ├── segaoutrun.md │ ├── taitoair.md │ ├── c64.md │ ├── namcogalaga.md │ ├── pv2000.md │ ├── shaolinsroad.md │ ├── alphatronicpc.md │ ├── memotech_mtx.md │ ├── pmd85.md │ └── sp2000.md └── img │ ├── linux.png │ ├── macos.png │ ├── win32.png │ ├── games │ ├── dex.gif │ ├── h7n9.png │ ├── zen.png │ ├── zen2.png │ ├── zx0.png │ ├── 9999-1.png │ ├── abydos.png │ ├── bifrost.png │ ├── bikers.png │ ├── bounty.gif │ ├── cnossus.png │ ├── coches.png │ ├── lamega.png │ ├── nirvana.png │ ├── o-cman.gif │ ├── o-trix.gif │ ├── souls.gif │ ├── splash.gif │ ├── stela.gif │ ├── yithm.gif │ ├── ad_lunam.png │ ├── bacaball.png │ ├── bacachase.png │ ├── berksman.gif │ ├── bifrost2.png │ ├── cabezooon.png │ ├── cuadragon.png │ ├── empareja.png │ ├── encuerer.gif │ ├── hobbitel.gif │ ├── jrpgtest.png │ ├── maritrini.gif │ ├── memorama.png │ ├── ratulzeki.gif │ ├── saltarin.gif │ ├── solitario.png │ ├── uchidanza.png │ ├── vaderetro.gif │ ├── zxstriker.png │ ├── 3reyesmagos.gif │ ├── binaryland.png │ ├── breakspace.gif │ ├── brokenfriend.gif │ ├── explorer_scr.png │ ├── fourspriter.png │ ├── hobbitel_2.gif │ ├── italia1944.png │ ├── multiioboard.png │ ├── nirvanaplus.png │ ├── pixelquest.png │ ├── pvaprologue.png │ ├── retrobsesion.gif │ ├── speccywars.png │ ├── zxconnection.png │ ├── zxdestroyer.png │ ├── ad_lunam_plus.png │ ├── cuadragon_next.png │ ├── p3efilebrowser.png │ ├── pixelquest2000.png │ ├── pixelquestzero.png │ ├── retrobsesionii.gif │ ├── chessboardattack.gif │ ├── ciclopesysaturno.png │ ├── earthraidingame.gif │ ├── hunt_the_wumpus.png │ ├── knightsdemonsdx.png │ ├── talesofgruppthe.png │ ├── thespectrumclient.png │ ├── uboothuntingame.gif │ ├── vampe-gotovampe.gif │ ├── justsomethingsilly.png │ ├── questforwitchcraft.gif │ ├── spectraldungeonsthe.gif │ └── walkingaroundporto.png │ ├── driver-down.png │ ├── zip-package-2.png │ ├── zip-package.png │ └── zxbasic_logo.png ├── tools └── profile.sh └── img ├── HobbitEl.gif ├── eleuterio.gif ├── zxbasic_logo.png └── KnightsDemonsDX.png /.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/zxbc/py.typed: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | docs.boriel-basic.net -------------------------------------------------------------------------------- /src/arch/z80/backend/py.typed: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/arch/z80/optimizer/py.typed: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/cmdline/empty.bas: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/functional/asm/dbbad.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/functional/asm/divint.bin: -------------------------------------------------------------------------------- 1 | [ -------------------------------------------------------------------------------- /tests/functional/asm/ltee12.bin: -------------------------------------------------------------------------------- 1 | ~~ -------------------------------------------------------------------------------- /tests/functional/asm/newl.asm: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/functional/asm/asmcolon2.bin: -------------------------------------------------------------------------------- 1 | _ -------------------------------------------------------------------------------- /tests/functional/asm/asmconst0.bin: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /tests/functional/asm/asmerror0.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/functional/asm/end_newline.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/functional/asm/hex_num.bin: -------------------------------------------------------------------------------- 1 | >> -------------------------------------------------------------------------------- /tests/functional/asm/incbin3.bin: -------------------------------------------------------------------------------- 1 | ud -------------------------------------------------------------------------------- /tests/functional/asm/incbin4.bin: -------------------------------------------------------------------------------- 1 | 5, -------------------------------------------------------------------------------- /tests/functional/asm/nop_nop.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/functional/asm/paren.bin: -------------------------------------------------------------------------------- 1 | !> -------------------------------------------------------------------------------- /tests/functional/asm/rel_include.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/functional/asm/shift.bin: -------------------------------------------------------------------------------- 1 | >> -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/co.bas: -------------------------------------------------------------------------------- 1 | : 2 | -------------------------------------------------------------------------------- /tests/functional/asm/align2.bin: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /tests/functional/asm/asmprepro.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/functional/asm/im0.asm: -------------------------------------------------------------------------------- 1 | 2 | im 3 3 | -------------------------------------------------------------------------------- /tests/functional/asm/incbin5.bin: -------------------------------------------------------------------------------- 1 | ", -6 2 | -------------------------------------------------------------------------------- /tests/functional/asm/ltee11.bin: -------------------------------------------------------------------------------- 1 | ::> -------------------------------------------------------------------------------- /tests/functional/asm/tmp_label4.bin: -------------------------------------------------------------------------------- 1 | !! -------------------------------------------------------------------------------- /tests/functional/asm/tmp_label5.bin: -------------------------------------------------------------------------------- 1 | !! -------------------------------------------------------------------------------- /tests/functional/asm/tmp_label6.bin: -------------------------------------------------------------------------------- 1 | !! -------------------------------------------------------------------------------- /tests/functional/asm/utf-8-bom-asm.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | omit = 3 | .tox/* 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/00.bas: -------------------------------------------------------------------------------- 1 | DIM a 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/02.bas: -------------------------------------------------------------------------------- 1 | DIM a% 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/04.bas: -------------------------------------------------------------------------------- 1 | DIM a$ 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/06.bas: -------------------------------------------------------------------------------- 1 | DIM a$(2) 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/21.bas: -------------------------------------------------------------------------------- 1 | LET a = b 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/end.bas: -------------------------------------------------------------------------------- 1 | END 35 2 | -------------------------------------------------------------------------------- /tests/functional/asm/and_err.asm: -------------------------------------------------------------------------------- 1 | and : a, 0 2 | -------------------------------------------------------------------------------- /tests/functional/asm/hex_num1.asm: -------------------------------------------------------------------------------- 1 | ld a, 0xff 2 | -------------------------------------------------------------------------------- /tests/functional/asm/namespace00.bin: -------------------------------------------------------------------------------- 1 | >!w> -------------------------------------------------------------------------------- /tests/functional/asm/namespace01.bin: -------------------------------------------------------------------------------- 1 | >!w> -------------------------------------------------------------------------------- /tests/functional/asm/nop_nop.asm: -------------------------------------------------------------------------------- 1 | nop:nop 2 | -------------------------------------------------------------------------------- /tests/functional/asm/rst0.asm: -------------------------------------------------------------------------------- 1 | 2 | rst 1 3 | -------------------------------------------------------------------------------- /tests/functional/asm/tmp_label0.bin: -------------------------------------------------------------------------------- 1 | !*! * -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/03.bas: -------------------------------------------------------------------------------- 1 | DIM a As UByte 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/07.bas: -------------------------------------------------------------------------------- 1 | DIM a$(2, 3) 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/20.bas: -------------------------------------------------------------------------------- 1 | 2 | LET a = 1 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/in0.bas: -------------------------------------------------------------------------------- 1 | a = IN 254 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/inkey.bas: -------------------------------------------------------------------------------- 1 | a$ = inkey$ 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/llc.bas: -------------------------------------------------------------------------------- 1 | LET r$(1)="." 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/print_eol.bas: -------------------------------------------------------------------------------- 1 | PRINT 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/str1.bas: -------------------------------------------------------------------------------- 1 | LET a$=STR 1 2 | -------------------------------------------------------------------------------- /tests/functional/asm/asmconst0.asm: -------------------------------------------------------------------------------- 1 | 2 | db 0x10 3 | -------------------------------------------------------------------------------- /tests/functional/asm/bitop0.asm: -------------------------------------------------------------------------------- 1 | 2 | set 8, a 3 | -------------------------------------------------------------------------------- /tests/functional/asm/db_multi.bin: -------------------------------------------------------------------------------- 1 | Hello World Hello -------------------------------------------------------------------------------- /tests/functional/asm/dbbad.asm: -------------------------------------------------------------------------------- 1 | 2 | 3 | db 256 4 | -------------------------------------------------------------------------------- /tests/functional/asm/end_newline.asm: -------------------------------------------------------------------------------- 1 | nop 2 | END 3 | -------------------------------------------------------------------------------- /tests/functional/asm/namespace_push_pop.bin: -------------------------------------------------------------------------------- 1 | :: -------------------------------------------------------------------------------- /tests/functional/asm/preprocerr2.asm: -------------------------------------------------------------------------------- 1 | #define @ 2 | -------------------------------------------------------------------------------- /docs/architectures/ninjawarriors.md: -------------------------------------------------------------------------------- 1 | # NinjaWarriors 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/01.bas: -------------------------------------------------------------------------------- 1 | DIM a% as Ubyte 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/05.bas: -------------------------------------------------------------------------------- 1 | DIM a(10) as Ubyte 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/09.bas: -------------------------------------------------------------------------------- 1 | DIM a(1) = {2, 3} 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/12.bas: -------------------------------------------------------------------------------- 1 | 100 DIM a as Ubyte 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/border00_IC.bas: -------------------------------------------------------------------------------- 1 | border 7 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/code00.bas: -------------------------------------------------------------------------------- 1 | LOAD "" CODE 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/codecrash1.bas: -------------------------------------------------------------------------------- 1 | a=code(b$) 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/doloop1.bas: -------------------------------------------------------------------------------- 1 | 2 | DO LOOP 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/eq0.bas: -------------------------------------------------------------------------------- 1 | 2 | a = b = c 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/lexerr.bas: -------------------------------------------------------------------------------- 1 | LET a = a % 1 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/noheap.bas: -------------------------------------------------------------------------------- 1 | PRINT 12345 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/print_tab.bas: -------------------------------------------------------------------------------- 1 | PRINT TAB 5; 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/slice0.bas: -------------------------------------------------------------------------------- 1 | a$ = a$(10 TO) 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/inkey.bas: -------------------------------------------------------------------------------- 1 | a$ = inkey$ 2 | -------------------------------------------------------------------------------- /tests/functional/asm/align3.asm: -------------------------------------------------------------------------------- 1 | 2 | align 0 3 | nop 4 | -------------------------------------------------------------------------------- /tests/functional/asm/asmcolon2.asm: -------------------------------------------------------------------------------- 1 | ld e,a : ld d,0 2 | -------------------------------------------------------------------------------- /tests/functional/asm/asmerror2.asm: -------------------------------------------------------------------------------- 1 | 2 | LD a, @# 3 | -------------------------------------------------------------------------------- /tests/functional/asm/db256.bin: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /tests/functional/asm/defsbad.asm: -------------------------------------------------------------------------------- 1 | 2 | DEFS 'a', 2, 3 3 | -------------------------------------------------------------------------------- /tests/functional/asm/jr_no_label.asm: -------------------------------------------------------------------------------- 1 | jr z,sigPuente 2 | -------------------------------------------------------------------------------- /tests/functional/asm/ldix1.asm: -------------------------------------------------------------------------------- 1 | 2 | ld (ix - 12), 0 3 | -------------------------------------------------------------------------------- /tests/functional/asm/ldix3.asm: -------------------------------------------------------------------------------- 1 | 2 | ld (ix 12 + 5), 0 3 | -------------------------------------------------------------------------------- /tests/functional/asm/ldix4.asm: -------------------------------------------------------------------------------- 1 | 2 | ld (ix * 12), 0 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/27.bas: -------------------------------------------------------------------------------- 1 | 2 | LET b$ = "ZXBASIC" 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/baspreprocerr2.bas: -------------------------------------------------------------------------------- 1 | #define @ 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/code01.bas: -------------------------------------------------------------------------------- 1 | LOAD "" CODE 16384 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/codecrash2.bas: -------------------------------------------------------------------------------- 1 | a = code(b$+b$) 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/codecrash3.bas: -------------------------------------------------------------------------------- 1 | a = code(inkey$) 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dowhile1.bas: -------------------------------------------------------------------------------- 1 | DO LOOP WHILE 1 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/load03.bas: -------------------------------------------------------------------------------- 1 | LOAD "test" DATA 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/mcleod.bas: -------------------------------------------------------------------------------- 1 | DIM a = int(rnd * 4) 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/print_comma.bas: -------------------------------------------------------------------------------- 1 | 2 | PRINT 1, 2 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/print_eol_attr.bas: -------------------------------------------------------------------------------- 1 | PRINT a$ 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/save03.bas: -------------------------------------------------------------------------------- 1 | SAVE "test" DATA 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/simple.bas: -------------------------------------------------------------------------------- 1 | PRINT "HELLO WORLD" 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/sna_00.bas: -------------------------------------------------------------------------------- 1 | PRINT "HELLO WORLD" 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/stoperr.bas: -------------------------------------------------------------------------------- 1 | STOP 2 | ERROR 0 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/substr_empty.bas: -------------------------------------------------------------------------------- 1 | 2 | a$=b$(TO) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/substr_empty2.bas: -------------------------------------------------------------------------------- 1 | a$="STRING"() 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/tap_00.bas: -------------------------------------------------------------------------------- 1 | PRINT "HELLO WORLD" 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/tzx_00.bas: -------------------------------------------------------------------------------- 1 | PRINT "HELLO WORLD" 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/unary_crash.bas: -------------------------------------------------------------------------------- 1 | 2 | a = -b(4) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/z80_00.bas: -------------------------------------------------------------------------------- 1 | PRINT "HELLO WORLD" 2 | -------------------------------------------------------------------------------- /tests/functional/asm/asmerror1.asm: -------------------------------------------------------------------------------- 1 | PROC 2 | 3 | 4 | ENDP 5 | -------------------------------------------------------------------------------- /tests/functional/asm/bitop1.asm: -------------------------------------------------------------------------------- 1 | 2 | 3 | set 8, (ix + 3) 4 | -------------------------------------------------------------------------------- /tests/functional/asm/ldix2.asm: -------------------------------------------------------------------------------- 1 | 2 | ld (ix (- 12 + 5)), 0 3 | -------------------------------------------------------------------------------- /tests/functional/asm/ltee12.asm: -------------------------------------------------------------------------------- 1 | ld a, (hl) 2 | ld a, [hl] 3 | -------------------------------------------------------------------------------- /tests/functional/asm/tmp_label2.asm: -------------------------------------------------------------------------------- 1 | 2 | ld hl, 1b 3 | 1: 4 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro09.bi: -------------------------------------------------------------------------------- 1 | #define PI 2 | 3 | PI 4 | -------------------------------------------------------------------------------- /src/lib/arch/zx48k/runtime/sgnf.asm: -------------------------------------------------------------------------------- 1 | #include once 2 | 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/08.bas: -------------------------------------------------------------------------------- 1 | 2 | 3 | DIM x as Ubyte = 5 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/10.bas: -------------------------------------------------------------------------------- 1 | DIM a(1) as Ubyte = {2, 3} 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/13.bas: -------------------------------------------------------------------------------- 1 | mylabel: 2 | DIM a as Ubyte 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/15.bas: -------------------------------------------------------------------------------- 1 | LET a = 1 2 | LET a = a + 1 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/16.bas: -------------------------------------------------------------------------------- 1 | LET a = 1 2 | LET b = a + 1 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/22.bas: -------------------------------------------------------------------------------- 1 | DIM b as Ubyte 2 | LET a = -b 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/25.bas: -------------------------------------------------------------------------------- 1 | LET a = 5.1 2 | let c = not a 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/26.bas: -------------------------------------------------------------------------------- 1 | 2 | LET a = LEN("ZXBASIC") 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/alxinho1.bas: -------------------------------------------------------------------------------- 1 | 2 | 3 | DIM b = @a(0) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/bin02.bas: -------------------------------------------------------------------------------- 1 | 2 | LET a = BIN a = a + 1 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/chr1.bas: -------------------------------------------------------------------------------- 1 | LET a = CHR$(32, 65, 33) 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/code02.bas: -------------------------------------------------------------------------------- 1 | LOAD "" CODE 16384, 6192 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dountil1.bas: -------------------------------------------------------------------------------- 1 | 2 | DO LOOP UNTIL 0 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/mcleod2.bas: -------------------------------------------------------------------------------- 1 | DIM a as String = "" 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt2_nogoto.bas: -------------------------------------------------------------------------------- 1 | 2 | GOTO nolabel 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/out0.bas: -------------------------------------------------------------------------------- 1 | OUT 254, 1 2 | OUT 254, a 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/print42.bas: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/print64.bas: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/print_at.bas: -------------------------------------------------------------------------------- 1 | PRINT AT 10, 10; " "; 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/rnd.bas: -------------------------------------------------------------------------------- 1 | 2 | RANDOMIZE 3 | a = RND 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/save.bas: -------------------------------------------------------------------------------- 1 | 2 | SAVE "test" SCREEN$ 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/stdlib_attr.bas: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/stdlib_hex.bas: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/stdlib_pos.bas: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/asm/align.bin: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /tests/functional/asm/divint.asm: -------------------------------------------------------------------------------- 1 | 2 | ld d, $5B00 / 256 3 | -------------------------------------------------------------------------------- /tests/functional/asm/tmp_label1.asm: -------------------------------------------------------------------------------- 1 | 1: 2 | nop 3 | ld hl, 1f 4 | -------------------------------------------------------------------------------- /tests/functional/asm/undef_label.asm: -------------------------------------------------------------------------------- 1 | 2 | LABEL1 EQU LABEL2 + 1 3 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro51.bi: -------------------------------------------------------------------------------- 1 | #define X A(1) 2 | 3 | X 4 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro77.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro77.bi" 2 | 3 | -------------------------------------------------------------------------------- /src/lib/arch/zx48k/runtime/cmp/lti8.asm: -------------------------------------------------------------------------------- 1 | #include once 2 | -------------------------------------------------------------------------------- /src/lib/arch/zx48k/runtime/sgnf16.asm: -------------------------------------------------------------------------------- 1 | #include once 2 | 3 | -------------------------------------------------------------------------------- /src/lib/arch/zx48k/runtime/sgni16.asm: -------------------------------------------------------------------------------- 1 | #include once 2 | 3 | -------------------------------------------------------------------------------- /src/lib/arch/zx48k/runtime/sgni32.asm: -------------------------------------------------------------------------------- 1 | #include once 2 | 3 | -------------------------------------------------------------------------------- /src/lib/arch/zxnext/runtime/cmp/lti8.asm: -------------------------------------------------------------------------------- 1 | #include once 2 | -------------------------------------------------------------------------------- /src/lib/arch/zxnext/runtime/sgnf.asm: -------------------------------------------------------------------------------- 1 | #include once 2 | 3 | -------------------------------------------------------------------------------- /src/lib/arch/zxnext/runtime/sgnf16.asm: -------------------------------------------------------------------------------- 1 | #include once 2 | 3 | -------------------------------------------------------------------------------- /src/lib/arch/zxnext/runtime/sgni16.asm: -------------------------------------------------------------------------------- 1 | #include once 2 | 3 | -------------------------------------------------------------------------------- /src/lib/arch/zxnext/runtime/sgni32.asm: -------------------------------------------------------------------------------- 1 | #include once 2 | 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/17.bas: -------------------------------------------------------------------------------- 1 | LET a = 1 2 | LET b = 1 + a + 2 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/30.bas: -------------------------------------------------------------------------------- 1 | 2 | Function a() 3 | End Function 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/bin03.bas: -------------------------------------------------------------------------------- 1 | 2 | LET a = BIN: a = a + 1 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/data0.bas: -------------------------------------------------------------------------------- 1 | DIM a as Byte 2 | DATA a, b(2) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dimconst6.bas: -------------------------------------------------------------------------------- 1 | DIM Map As Ubyte = 0x1234 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/funccall3.bas: -------------------------------------------------------------------------------- 1 | 2 | LET a = 5 3 | 4 | a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/label_sent1.bas: -------------------------------------------------------------------------------- 1 | 0 REM 2 | 10 BORDER 1 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/lvalsubstr_nolet.bas: -------------------------------------------------------------------------------- 1 | DIM a$ 2 | a$(1)="." 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt1_len.bas: -------------------------------------------------------------------------------- 1 | 2 | LET c = LEN(INKEY$) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/print_f.bas: -------------------------------------------------------------------------------- 1 | DIM a as Float 2 | PRINT a; 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/print_f16.bas: -------------------------------------------------------------------------------- 1 | DIM a as Fixed 2 | PRINT a; 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/print_i32.bas: -------------------------------------------------------------------------------- 1 | DIM a as Long 2 | PRINT a; 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/print_i8.bas: -------------------------------------------------------------------------------- 1 | DIM a as Byte 2 | PRINT a; 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/print_u32.bas: -------------------------------------------------------------------------------- 1 | DIM a as ULong 2 | PRINT a; 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/print_u8.bas: -------------------------------------------------------------------------------- 1 | DIM a as Ubyte 2 | PRINT a; 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/stdlib_SP_Fill.bas: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/stdlib_alloc.bas: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/stdlib_basic.bas: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/stdlib_csrlin.bas: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/stdlib_memcopy.bas: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/stdlib_screen.bas: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/stdlib_scroll.bas: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/print_f.bas: -------------------------------------------------------------------------------- 1 | DIM a as Float 2 | PRINT a; 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/print_i32.bas: -------------------------------------------------------------------------------- 1 | DIM a as Long 2 | PRINT a; 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/print_i8.bas: -------------------------------------------------------------------------------- 1 | DIM a as Byte 2 | PRINT a; 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/print_u8.bas: -------------------------------------------------------------------------------- 1 | DIM a as Ubyte 2 | PRINT a; 3 | -------------------------------------------------------------------------------- /tests/functional/asm/asmcolon4.asm: -------------------------------------------------------------------------------- 1 | ld a, 0 : LOOP : nop : jp LOOP 2 | -------------------------------------------------------------------------------- /tests/functional/asm/asmlabel1.asm: -------------------------------------------------------------------------------- 1 | 2 | label : 3 | jp label 4 | -------------------------------------------------------------------------------- /tests/functional/asm/hex_num.asm: -------------------------------------------------------------------------------- 1 | 2 | 3 | ld a, $1f 4 | ld a, $1e 5 | -------------------------------------------------------------------------------- /tests/functional/asm/incbin6.asm: -------------------------------------------------------------------------------- 1 | 2 | incbin "incbin6.asm", -60, 2 3 | -------------------------------------------------------------------------------- /tests/functional/asm/shift.asm: -------------------------------------------------------------------------------- 1 | 2 | LD a, 255 >> 1 3 | LD a, 1 << 1 4 | -------------------------------------------------------------------------------- /tools/profile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | python -m cProfile "$@" 4 | 5 | -------------------------------------------------------------------------------- /docs/architectures/neogeo.md: -------------------------------------------------------------------------------- 1 | # NeoGeo 2 | 3 | * http://wiki.neogeodev.org 4 | -------------------------------------------------------------------------------- /docs/architectures/sc3000.md: -------------------------------------------------------------------------------- 1 | # SC3000 2 | 3 | * http://www.sc-3000.com 4 | -------------------------------------------------------------------------------- /src/lib/arch/zx48k/runtime/printu16.asm: -------------------------------------------------------------------------------- 1 | #include once 2 | 3 | -------------------------------------------------------------------------------- /src/lib/arch/zx48k/runtime/printu32.asm: -------------------------------------------------------------------------------- 1 | #include once 2 | 3 | -------------------------------------------------------------------------------- /src/lib/arch/zx48k/runtime/printu8.asm: -------------------------------------------------------------------------------- 1 | #include once 2 | 3 | -------------------------------------------------------------------------------- /src/lib/arch/zxnext/runtime/printu16.asm: -------------------------------------------------------------------------------- 1 | #include once 2 | 3 | -------------------------------------------------------------------------------- /src/lib/arch/zxnext/runtime/printu32.asm: -------------------------------------------------------------------------------- 1 | #include once 2 | 3 | -------------------------------------------------------------------------------- /src/lib/arch/zxnext/runtime/printu8.asm: -------------------------------------------------------------------------------- 1 | #include once 2 | 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/11.bas: -------------------------------------------------------------------------------- 1 | DIM a(1, 2) = {{3, 2, 1}, {1, 2, 3}} 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/28.bas: -------------------------------------------------------------------------------- 1 | LET a$ = "ZXBASIC" 2 | LET c = LEN(a$) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/48.bas: -------------------------------------------------------------------------------- 1 | LET a$ = "ZXBASIC" 2 | LET b$ = a$(2) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/abs.bas: -------------------------------------------------------------------------------- 1 | LET a = abs(1) 2 | LET a = -abs(a) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ataddr.bas: -------------------------------------------------------------------------------- 1 | DIM a(10, 10) 2 | LET b = @a(5, 4) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/bnot32.bas: -------------------------------------------------------------------------------- 1 | DIM a as ULong 2 | 3 | a = bNot a 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/defb.bas: -------------------------------------------------------------------------------- 1 | ASM 2 | DEFB "Man(e;@ " 3 | END ASM 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dimconst3.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a = @Map 3 | 4 | Map: 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/fornext3.bas: -------------------------------------------------------------------------------- 1 | FOR i = 0 TO 10000: 2 | NEXT i 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/label_sent2.bas: -------------------------------------------------------------------------------- 1 | 0 REM 2 | 10 BORDER 1: PAPER 1 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/loadstr.bas: -------------------------------------------------------------------------------- 1 | b$ = "10" 2 | a$ = str$(val(b$)) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/math_acs.bas: -------------------------------------------------------------------------------- 1 | DIM x As Float 2 | LET x = ACS(x) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/math_asn.bas: -------------------------------------------------------------------------------- 1 | DIM x As Float 2 | LET x = ASN(x) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/math_atn.bas: -------------------------------------------------------------------------------- 1 | DIM x As Float 2 | LET x = ATN(x) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/math_cos.bas: -------------------------------------------------------------------------------- 1 | DIM x As Float 2 | LET x = COS(x) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/math_exp.bas: -------------------------------------------------------------------------------- 1 | DIM x As Float 2 | LET x = EXP(x) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/math_ln.bas: -------------------------------------------------------------------------------- 1 | DIM x As Float 2 | LET x = LN(x) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/math_sin.bas: -------------------------------------------------------------------------------- 1 | DIM x As Float 2 | LET x = SIN(x) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/math_sqr.bas: -------------------------------------------------------------------------------- 1 | DIM x As Float 2 | LET x = SQR(x) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/math_tan.bas: -------------------------------------------------------------------------------- 1 | DIM x As Float 2 | LET x = TAN(x) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/nosub.bas: -------------------------------------------------------------------------------- 1 | declare sub nofunc 2 | 3 | nofunc() 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt1_usr.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as UByte 3 | a = USR a 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt2_include_unused.bas: -------------------------------------------------------------------------------- 1 | #include "func0.bas" 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/print_i16.bas: -------------------------------------------------------------------------------- 1 | DIM a as Integer 2 | PRINT a; 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/print_u16.bas: -------------------------------------------------------------------------------- 1 | DIM a as UInteger 2 | PRINT a; 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/randomize.bas: -------------------------------------------------------------------------------- 1 | RANDOMIZE 2 | 3 | RANDOMIZE 32 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/restore4.bas: -------------------------------------------------------------------------------- 1 | 2 | 3 | restore 4 | 5 | read a 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/sgnf.bas: -------------------------------------------------------------------------------- 1 | dim y as Float=1 2 | poke 0, sgn y 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/sgnf16.bas: -------------------------------------------------------------------------------- 1 | dim y as Fixed=1 2 | poke 0, sgn y 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/sgni32.bas: -------------------------------------------------------------------------------- 1 | dim y as Long=1 2 | poke 0, sgn y 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/sgni8.bas: -------------------------------------------------------------------------------- 1 | dim y as Byte=1 2 | poke 0, sgn y 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/sgnu32.bas: -------------------------------------------------------------------------------- 1 | dim y as uLong=1 2 | poke 0, sgn y 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/sgnu8.bas: -------------------------------------------------------------------------------- 1 | dim y as uByte=1 2 | poke 0, sgn y 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/stdlib_clearbox.bas: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/stdlib_putchars.bas: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/stdlib_scrbuffer.bas: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/stdlib_winscroll.bas: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/usr0.bas: -------------------------------------------------------------------------------- 1 | DIM a AS UInteger 2 | LET a = USR "A" 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/math_ln.bas: -------------------------------------------------------------------------------- 1 | DIM x As Float 2 | LET x = LN(x) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/print_i16.bas: -------------------------------------------------------------------------------- 1 | DIM a as Integer 2 | PRINT a; 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/print_u16.bas: -------------------------------------------------------------------------------- 1 | DIM a as UInteger 2 | PRINT a; 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/print_u32.bas: -------------------------------------------------------------------------------- 1 | DIM a as ULong 2 | PRINT a; 3 | -------------------------------------------------------------------------------- /tests/functional/asm/asm_wrong_opcode.asm: -------------------------------------------------------------------------------- 1 | 2 | ld d, [.c] 3 | 4 | .c: 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro00.bi: -------------------------------------------------------------------------------- 1 | #include 2 | PRINT "HELLO" 3 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro09.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro09.bi" 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro29.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro29.bi" 2 | 3 | 4 | ZZ 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro36.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro36.bi" 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro40.bi: -------------------------------------------------------------------------------- 1 | #define macro() TEST 2 | 3 | macro 4 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro76.bi: -------------------------------------------------------------------------------- 1 | 2 | #error this is an intended error 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/18.bas: -------------------------------------------------------------------------------- 1 | LET a = 1 2 | LET c = 2 3 | LET b = a + 2 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/29.bas: -------------------------------------------------------------------------------- 1 | LET a$ = "ZXBASIC" 2 | LET b = LEN(a$ + a$) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/49.bas: -------------------------------------------------------------------------------- 1 | LET a$ = "ZXBASIC" 2 | LET b$ = a$(2 TO 3) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/50.bas: -------------------------------------------------------------------------------- 1 | LET a$ = "ZXBASIC" 2 | LET b$ = a$(a TO b) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/51.bas: -------------------------------------------------------------------------------- 1 | LET a$ = "ZXBASIC" 2 | LET b$ = a$(c TO b) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/abs16.bas: -------------------------------------------------------------------------------- 1 | DIM a, b as Integer 2 | 3 | a = ABS(b) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/abs32.bas: -------------------------------------------------------------------------------- 1 | DIM a, b as Fixed 2 | 3 | a = ABS(b) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/def_func_inline.bas: -------------------------------------------------------------------------------- 1 | 2 | FUNCTION f() END FUNCTION 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dim_str_error1.bas: -------------------------------------------------------------------------------- 1 | 2 | 3 | DIM a$(2) => {0, 1, 2} 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/div32.bas: -------------------------------------------------------------------------------- 1 | DIM a as Fixed 2 | 3 | LET a = a / -1 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dollar.bas: -------------------------------------------------------------------------------- 1 | ASM 2 | 3 | jr $+2 4 | 5 | End ASM 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/explicit0.bas: -------------------------------------------------------------------------------- 1 | #pragma explicit = True 2 | A = 5 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/forline.bas: -------------------------------------------------------------------------------- 1 | 2 | FOR i = 1 TO 10 PRINT "HOLA" NEXT 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/fp_pow.bas: -------------------------------------------------------------------------------- 1 | DIM x as Float 2 | 3 | LET x = x ^ 2.5 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/id_substr_eq_expr.bas: -------------------------------------------------------------------------------- 1 | 2 | a$(1 TO 5) = "Hello" 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifempty0.bas: -------------------------------------------------------------------------------- 1 | DIM i as Byte 2 | 3 | IF i < 0 THEN : 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/label_sent3.bas: -------------------------------------------------------------------------------- 1 | 0 REM 2 | 10 BORDER 1: PAPER 1: 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/label_sent4.bas: -------------------------------------------------------------------------------- 1 | 0 REM 2 | 10 :BORDER 1: PAPER 1 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/label_sent5.bas: -------------------------------------------------------------------------------- 1 | 0 REM 2 | 10 :BORDER 1: PAPER 1: 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ltee8.bas: -------------------------------------------------------------------------------- 1 | DIM a as UByte 2 | LET a = INT(@a / 256) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/modf.bas: -------------------------------------------------------------------------------- 1 | DIM a as Float 2 | 3 | LET a = a MOD 1 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/modf16.bas: -------------------------------------------------------------------------------- 1 | DIM a as Fixed 2 | 3 | LET a = a MOD 1 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/mul16c.bas: -------------------------------------------------------------------------------- 1 | DIM a as Integer 2 | 3 | a = -1 * a 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/nef.bas: -------------------------------------------------------------------------------- 1 | DIM t as Float 2 | 3 | POKE 0, (t <> 0) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/nef16.bas: -------------------------------------------------------------------------------- 1 | DIM t as Fixed 2 | 3 | POKE 0, (t <> 0) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/nei32.bas: -------------------------------------------------------------------------------- 1 | DIM t as Long 2 | 3 | POKE 0, (t <> 0) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/nei8.bas: -------------------------------------------------------------------------------- 1 | DIM t as Byte 2 | 3 | POKE 0, (t <> 0) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/neu32.bas: -------------------------------------------------------------------------------- 1 | DIM t as Ulong 2 | 3 | POKE 0, (t <> 0) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/neu8.bas: -------------------------------------------------------------------------------- 1 | DIM t as UByte 2 | 3 | POKE 0, (t <> 0) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/paramstr3.bas: -------------------------------------------------------------------------------- 1 | p(a$) 2 | 3 | sub p(q$) 4 | end sub 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/sgni16.bas: -------------------------------------------------------------------------------- 1 | dim y as Integer=1 2 | poke 0, sgn y 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/sgnu16.bas: -------------------------------------------------------------------------------- 1 | dim y as uInteger=1 2 | poke 0, sgn y 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/stdlib_spectranet.bas: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/storef.bas: -------------------------------------------------------------------------------- 1 | DIM f, miny as Float 2 | 3 | f = miny 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/storeu32.bas: -------------------------------------------------------------------------------- 1 | DIM f, miny as ULong 2 | 3 | f = miny 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/storeu8.bas: -------------------------------------------------------------------------------- 1 | DIM f, miny as UByte 2 | 3 | f = miny 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/substr_expr.bas: -------------------------------------------------------------------------------- 1 | 2 | LET b$ = (a$ + ".")(5 TO ) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/div32.bas: -------------------------------------------------------------------------------- 1 | DIM a as Fixed 2 | 3 | LET a = a / -1 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/fp_pow.bas: -------------------------------------------------------------------------------- 1 | DIM x as Float 2 | 3 | LET x = x ^ 2.5 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/math_acs.bas: -------------------------------------------------------------------------------- 1 | DIM x As Float 2 | LET x = ACS(x) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/math_asn.bas: -------------------------------------------------------------------------------- 1 | DIM x As Float 2 | LET x = ASN(x) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/math_atn.bas: -------------------------------------------------------------------------------- 1 | DIM x As Float 2 | LET x = ATN(x) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/math_cos.bas: -------------------------------------------------------------------------------- 1 | DIM x As Float 2 | LET x = COS(x) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/math_exp.bas: -------------------------------------------------------------------------------- 1 | DIM x As Float 2 | LET x = EXP(x) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/math_sin.bas: -------------------------------------------------------------------------------- 1 | DIM x As Float 2 | LET x = SIN(x) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/math_sqr.bas: -------------------------------------------------------------------------------- 1 | DIM x As Float 2 | LET x = SQR(x) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/math_tan.bas: -------------------------------------------------------------------------------- 1 | DIM x As Float 2 | LET x = TAN(x) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/modf.bas: -------------------------------------------------------------------------------- 1 | DIM a as Float 2 | 3 | LET a = a MOD 1 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/modf16.bas: -------------------------------------------------------------------------------- 1 | DIM a as Fixed 2 | 3 | LET a = a MOD 1 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/mul16c.bas: -------------------------------------------------------------------------------- 1 | DIM a as Integer 2 | 3 | a = -1 * a 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/muli8.bas: -------------------------------------------------------------------------------- 1 | DIM a as Byte 2 | 3 | LET a = a * 3 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/mulu8.bas: -------------------------------------------------------------------------------- 1 | DIM a as UByte 2 | 3 | LET a = a * 3 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/nef.bas: -------------------------------------------------------------------------------- 1 | DIM t as Float 2 | 3 | POKE 0, (t <> 0) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/nef16.bas: -------------------------------------------------------------------------------- 1 | DIM t as Fixed 2 | 3 | POKE 0, (t <> 0) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/nei32.bas: -------------------------------------------------------------------------------- 1 | DIM t as Long 2 | 3 | POKE 0, (t <> 0) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/nei8.bas: -------------------------------------------------------------------------------- 1 | DIM t as Byte 2 | 3 | POKE 0, (t <> 0) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/neu32.bas: -------------------------------------------------------------------------------- 1 | DIM t as Ulong 2 | 3 | POKE 0, (t <> 0) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/neu8.bas: -------------------------------------------------------------------------------- 1 | DIM t as UByte 2 | 3 | POKE 0, (t <> 0) 4 | -------------------------------------------------------------------------------- /tests/functional/asm/jp1f_bad.asm: -------------------------------------------------------------------------------- 1 | jp 1f 2 | nop 3 | 1: 4 | jp 1f 5 | nop 6 | 1: 7 | -------------------------------------------------------------------------------- /tests/functional/asm/orgbad.asm: -------------------------------------------------------------------------------- 1 | ; Invalid org address 2 | org -1 3 | 4 | nop 5 | -------------------------------------------------------------------------------- /tests/functional/asm/preprocerr1.asm: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro01.bi: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | PRINT "HOLA" 4 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro29.bi: -------------------------------------------------------------------------------- 1 | #define X ZZ 2 | 'must return ZZ 3 | X 4 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro40.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro40.bi" 2 | 3 | 4 | macro 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro51.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro51.bi" 2 | 3 | 4 | A(1) 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro52.bi: -------------------------------------------------------------------------------- 1 | #define X A(1) 2 | #define A(x) x 3 | 4 | X 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro63.bi: -------------------------------------------------------------------------------- 1 | 2 | 3 | #define q(a)XX##a 4 | 5 | q(5) 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro64.bi: -------------------------------------------------------------------------------- 1 | 2 | #define a 3 | 4 | #include a 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro71.bi: -------------------------------------------------------------------------------- 1 | #include "alloc.bas" 2 | 3 | PRINT "HOLA" 4 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro77.bi: -------------------------------------------------------------------------------- 1 | 2 | #warning this is an intended warning 3 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/stringizing0.bi: -------------------------------------------------------------------------------- 1 | 2 | 3 | #define z(x) # x 4 | 5 | z(1) 6 | -------------------------------------------------------------------------------- /docs/architectures/adam.md: -------------------------------------------------------------------------------- 1 | # Adam 2 | 3 | * http://drushel.cwru.edu/atm/atm.html 4 | -------------------------------------------------------------------------------- /docs/architectures/coco2.md: -------------------------------------------------------------------------------- 1 | # CoCo2 2 | 3 | * http://koti.mbnet.fi/~atjs/mc6809/ 4 | -------------------------------------------------------------------------------- /img/HobbitEl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/img/HobbitEl.gif -------------------------------------------------------------------------------- /tests/cmdline/config_sample.ini: -------------------------------------------------------------------------------- 1 | [zxbc] 2 | optimization_level = 3 3 | org = 31234 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/asm_tokens.bas: -------------------------------------------------------------------------------- 1 | asm 2 | ld a, {{macro_value}} 3 | end asm 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/bin01.bas: -------------------------------------------------------------------------------- 1 | REM BIN (alone) is like BIN 0 2 | LET a = BIN 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/callable_err.bas: -------------------------------------------------------------------------------- 1 | IF m$(s(1)-vm,s(2)-hm)="\c" THEN REM 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/def_func_inline_ok.bas: -------------------------------------------------------------------------------- 1 | 2 | FUNCTION f(): END FUNCTION 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dimconst4.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as Ubyte = @Map 3 | 4 | Map: 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dimconst4c.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as ULong = @Map 3 | 4 | Map: 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dimconst5.bas: -------------------------------------------------------------------------------- 1 | CONST b = 0 2 | DIM a as Ubyte = 65534 - b 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/do_crash.bas: -------------------------------------------------------------------------------- 1 | DIM A AS UBYTE 2 | DO LOOP WHILE A = "" 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/errletfunc.bas: -------------------------------------------------------------------------------- 1 | 2 | SUB x 3 | END SUB 4 | 5 | let x = 1 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/error_array.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM z(30) as Ubyte 3 | LET z$="#" 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/label_sent.bas: -------------------------------------------------------------------------------- 1 | 0 REM De MicroHOBBY Nº18, pág. 27 :') 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/labelsent.bas: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 LET a = a + 1: LET b = b + 1 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/lvalue00.bas: -------------------------------------------------------------------------------- 1 | const num as uByte = 5 2 | 3 | let num = 3 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/nei16.bas: -------------------------------------------------------------------------------- 1 | DIM t as Integer 2 | 3 | POKE 0, (t <> 0) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/neu16.bas: -------------------------------------------------------------------------------- 1 | DIM t as UInteger 2 | 3 | POKE 0, (t <> 0) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt2_letsubstr_not_used.bas: -------------------------------------------------------------------------------- 1 | DIM a$ 2 | LET a$(1)="." 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt3_asmexpr.bas: -------------------------------------------------------------------------------- 1 | asm 2 | ld de,56815-(8*41) 3 | end asm 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/print_bool.bas: -------------------------------------------------------------------------------- 1 | DIM a as UByte 2 | 3 | PRINT (a = a) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/read14.bas: -------------------------------------------------------------------------------- 1 | DIM j as Integer 2 | READ j 3 | 4 | DATA 700 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/restore1.bas: -------------------------------------------------------------------------------- 1 | 1000 RESTORE 1010: READ a 2 | 1010 DATA 85 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/storestr0.bas: -------------------------------------------------------------------------------- 1 | DIM f, miny as String 2 | 3 | f = miny 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/storeu16.bas: -------------------------------------------------------------------------------- 1 | DIM f, miny as UInteger 2 | 3 | f = miny 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/stradd.bas: -------------------------------------------------------------------------------- 1 | LET a$ = "HELLO" 2 | LET a$ = a$ + " WORLD" 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/substrlval.bas: -------------------------------------------------------------------------------- 1 | 10 LET a$="Test188" 2 | 30 LET a$(3)="z" 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/tap_01.bas: -------------------------------------------------------------------------------- 1 | #pragma org=0 2 | 3 | DIM a as UByte = 1 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/tap_include_asm_error.bas: -------------------------------------------------------------------------------- 1 | #include "extra_chars.bas" 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/whileempty.bas: -------------------------------------------------------------------------------- 1 | DIM i as Byte 2 | WHILE i < 5 END WHILE 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/mulu16.bas: -------------------------------------------------------------------------------- 1 | DIM a as UInteger 2 | 3 | LET a = a * 3 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/nei16.bas: -------------------------------------------------------------------------------- 1 | DIM t as Integer 2 | 3 | POKE 0, (t <> 0) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/neu16.bas: -------------------------------------------------------------------------------- 1 | DIM t as UInteger 2 | 3 | POKE 0, (t <> 0) 4 | -------------------------------------------------------------------------------- /tests/functional/asm/incbin2.bin: -------------------------------------------------------------------------------- 1 | ude a non binary file 2 | incbin "incbin2.asm", 16 3 | -------------------------------------------------------------------------------- /tests/functional/asm/ldix.asm: -------------------------------------------------------------------------------- 1 | 2 | ld (ix - 12 + 5), 0 3 | ld (ix + (-12 + 5)), 0 4 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/once_base.bi: -------------------------------------------------------------------------------- 1 | 2 | #include "once.bi" 3 | #include "once.bi" 4 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro35.bi: -------------------------------------------------------------------------------- 1 | asm 2 | ld a, \ ; test 3 | 5 4 | end asm 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro36.bi: -------------------------------------------------------------------------------- 1 | /' 2 | This comment should be removed 3 | '/ 4 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro42.bi: -------------------------------------------------------------------------------- 1 | #define X 0 2 | 3 | #if X 4 | print X 5 | #endif 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro43.bi: -------------------------------------------------------------------------------- 1 | #define X 1 2 | 3 | #if X 4 | print X 5 | #endif 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro44.bi: -------------------------------------------------------------------------------- 1 | #define X A 2 | 3 | #if X 4 | print X 5 | #endif 6 | -------------------------------------------------------------------------------- /docs/architectures/galeb.md: -------------------------------------------------------------------------------- 1 | # Galeb 2 | 3 | * http://retro.foing-nova.hr/galebemu.htm 4 | -------------------------------------------------------------------------------- /docs/architectures/neogeopocket.md: -------------------------------------------------------------------------------- 1 | # NeoGeoPocket 2 | 3 | * http://www.devrs.com/ngp/ 4 | -------------------------------------------------------------------------------- /docs/architectures/pcengine.md: -------------------------------------------------------------------------------- 1 | # PCEngine 2 | 3 | * http://www.villehelin.com/wla.html 4 | -------------------------------------------------------------------------------- /docs/img/linux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/linux.png -------------------------------------------------------------------------------- /docs/img/macos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/macos.png -------------------------------------------------------------------------------- /docs/img/win32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/win32.png -------------------------------------------------------------------------------- /img/eleuterio.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/img/eleuterio.gif -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/attr.bas: -------------------------------------------------------------------------------- 1 | INK 0: 2 | PAPER 7 3 | FLASH 1 4 | OVER 1 5 | BOLD 1 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/baspreprocerr1.bas: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/cast_i32tou32.bas: -------------------------------------------------------------------------------- 1 | DIM a as ULong 2 | 3 | LET a = INT(a) 4 | 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/chr.bas: -------------------------------------------------------------------------------- 1 | let a$ = CHR$ 33 2 | let b = 33 3 | let c = CHR$ b 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/chr0.bas: -------------------------------------------------------------------------------- 1 | LET a = 64 2 | LET b = 65 3 | LET c$ = CHR$(a+1, b) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/const6.bas: -------------------------------------------------------------------------------- 1 | const A as ubyte = 65 2 | 3 | let b = chr$ (A) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dim_str_error0.bas: -------------------------------------------------------------------------------- 1 | 2 | 3 | DIM a(2) as String => {0, 1, 2} 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dimconst4b.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as UInteger = @Map 3 | 4 | Map: 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/do_err.bas: -------------------------------------------------------------------------------- 1 | DIM i, c as Ubyte 2 | 3 | DO 4 | LET c = c * 2 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dountilempty.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM i as Byte 3 | DO UNTIL i > 10 LOOP 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/elseif1.bas: -------------------------------------------------------------------------------- 1 | DIM a AS Byte 2 | IF a < 0 THEN REM 3 | END IF 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/explicit5.bas: -------------------------------------------------------------------------------- 1 | #pragma explicit = True 2 | 3 | LET a(5) = "5" 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/explicit7.bas: -------------------------------------------------------------------------------- 1 | #pragma explicit = true 2 | 3 | POKE @a, 0 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/fporder.bas: -------------------------------------------------------------------------------- 1 | DIM n as Float = 1 2 | LET n = 10 - COS(n * PI) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/idco.bas: -------------------------------------------------------------------------------- 1 | 2 | SUB p() 3 | END sub 4 | 5 | p 6 | 7 | p:p 8 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifempty1.bas: -------------------------------------------------------------------------------- 1 | DIM i as Byte 2 | 3 | IF i < 0 THEN : END IF 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifempty4.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM i as UByte 3 | IF i < 0 THEN 4 | END IF 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifline.bas: -------------------------------------------------------------------------------- 1 | DIM a as UByte = 1 2 | IF a = 1 THEN a = a + 1 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/let_not_bool.bas: -------------------------------------------------------------------------------- 1 | DIM a As Ubyte 2 | 3 | LET a = NOT (a = a) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/letarrstr_substr1.bas: -------------------------------------------------------------------------------- 1 | DIM a$(5) 2 | 3 | b$ = a$(1)(2) 'OK 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/macro_under.bas: -------------------------------------------------------------------------------- 1 | #define _x 0 2 | dim x, y as ubyte 3 | y = x 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt1_endtest.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM N as uinteger = 12345 3 | end N 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt3_endtest.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM N as uinteger = 12345 3 | end N 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/poke3.bas: -------------------------------------------------------------------------------- 1 | DIM a(1 TO 3) as UInteger 2 | 3 | 4 | POKE(a, 5) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/poke4.bas: -------------------------------------------------------------------------------- 1 | DIM a(1 TO 3) as UInteger 2 | 3 | 4 | POKE a, 5 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/recur0.bas: -------------------------------------------------------------------------------- 1 | 2 | Function Test 3 | Test 4 | End Function 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/restore3.bas: -------------------------------------------------------------------------------- 1 | 2 | DATA 10 3 | 4 | restore 5 | 6 | read a 7 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/substr_expr_err.bas: -------------------------------------------------------------------------------- 1 | DIM a as Byte 2 | LET c$ = (a)(5 TO ) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/swap32.bas: -------------------------------------------------------------------------------- 1 | DIM a as ULong = 65535 2 | 3 | LET a = a / 10 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/sys_letsubstr0.bas: -------------------------------------------------------------------------------- 1 | 2 | LET a$ = "HELLO" 3 | LET a$(1) = "A" 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/whileempty1.bas: -------------------------------------------------------------------------------- 1 | DIM i as Byte 2 | WHILE i < 5 3 | END WHILE 4 | -------------------------------------------------------------------------------- /tests/functional/asm/asmerror0.asm: -------------------------------------------------------------------------------- 1 | PROC 2 | 3 | LOCAL X 4 | LOCAL X 5 | X: 6 | 7 | ENDP 8 | -------------------------------------------------------------------------------- /tests/functional/asm/asmlabel2.asm: -------------------------------------------------------------------------------- 1 | 2 | ; test label: instruction 3 | 4 | test: jp test 5 | -------------------------------------------------------------------------------- /tests/functional/asm/rel_include.asm: -------------------------------------------------------------------------------- 1 | #include once "../asm/rel_include.asm" 2 | 3 | NOP 4 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/line_asm.out: -------------------------------------------------------------------------------- 1 | #line 1 "line_asm.bi" 2 | ASM 3 | NOP 4 | END ASM 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro07.bi: -------------------------------------------------------------------------------- 1 | 2 | #define test(x,x) (x + x) 3 | 4 | func test (3) 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro30.bi: -------------------------------------------------------------------------------- 1 | #include once 2 | #include once 3 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro31.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro31.bi" 2 | 3 | 4 | t(x, (y - 1)) 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro34.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro34.bi" 2 | 3 | 4 | LET a = _ 5 | 5 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro37.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro37.bi" 2 | 3 | 4 | 5 | 6 | PRINT 7 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro38.bi: -------------------------------------------------------------------------------- 1 | 2 | #define myfunc() \ 3 | Test 4 | 5 | myfunc() 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro53.bi: -------------------------------------------------------------------------------- 1 | #define X(b) A(b) 2 | #define A(x) x 3 | 4 | X(1) 5 | -------------------------------------------------------------------------------- /docs/architectures/c128.md: -------------------------------------------------------------------------------- 1 | # C128 2 | 3 | * http://rvbelzen.tripod.com/128intpt/index.html 4 | -------------------------------------------------------------------------------- /docs/architectures/camputers_lynx.md: -------------------------------------------------------------------------------- 1 | # Camputers Lynx 2 | 3 | * http://camputerslynx.info/ 4 | -------------------------------------------------------------------------------- /docs/architectures/sharpx1.md: -------------------------------------------------------------------------------- 1 | # SharpX1 2 | 3 | * http://sanchome.oriongate.jp/?page_id=35 4 | -------------------------------------------------------------------------------- /docs/architectures/taitof1.md: -------------------------------------------------------------------------------- 1 | # TaitoF1 2 | 3 | * http://www.system16.com/hardware.php?id=662 4 | -------------------------------------------------------------------------------- /img/zxbasic_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/img/zxbasic_logo.png -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/41.bas: -------------------------------------------------------------------------------- 1 | DIM b(2) as Ubyte => {0AAh, 0BBh, 0CCh} 2 | LET a = b(1) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/bad_sigil.bas: -------------------------------------------------------------------------------- 1 | 2 | sub x(y$ as Float) 3 | y = "5" 4 | end sub 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/bin00.bas: -------------------------------------------------------------------------------- 1 | 2 | LET c = BIN 00101001 3 | LET d = BIN 11111111111 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/cast_ftoi16.bas: -------------------------------------------------------------------------------- 1 | DIM a as Integer 2 | DIM b as Float 3 | 4 | a = b 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/cast_ftoi32.bas: -------------------------------------------------------------------------------- 1 | DIM a as Long 2 | DIM b as Float 3 | 4 | a = b 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/cast_ftoi8.bas: -------------------------------------------------------------------------------- 1 | DIM a as Byte 2 | DIM b as Float 3 | 4 | a = b 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/codecrash4.bas: -------------------------------------------------------------------------------- 1 | a=code(b$) 2 | a = code(b$+b$) 3 | a = code(inkey$) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dowhileempty.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM i as Byte 3 | 4 | DO WHILE i < 10 LOOP 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/due_par.bas: -------------------------------------------------------------------------------- 1 | SUB test(code as Ubyte) 2 | k=in(12234 3 | END SUB 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/extra_chars.bas: -------------------------------------------------------------------------------- 1 | 2 | ASM 3 | `mylabel: 4 | ld a, #0 5 | END ASM 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/file_macro.bas: -------------------------------------------------------------------------------- 1 | 2 | #line 3 "file_macro.bas" 3 | LET a$ = __FILE__ 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/haplo_out.bas: -------------------------------------------------------------------------------- 1 | DIM a as UByte 2 | DIM b as Uinteger 3 | OUT b, a 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifcoendif.bas: -------------------------------------------------------------------------------- 1 | DIM a as Byte 2 | 3 | IF a < 1 THEN: LET a = a + 1: 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifempty2.bas: -------------------------------------------------------------------------------- 1 | DIM i as Byte 2 | 3 | IF i < 0 THEN : ELSE i = i + 1 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifempty5.bas: -------------------------------------------------------------------------------- 1 | DIM i as Byte 2 | 3 | IF 1 THEN i = i + 1: END IF 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/let0.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as UByte = 1 3 | LET a = 2 4 | LET a = a + 1 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/let_array_substr6.bas: -------------------------------------------------------------------------------- 1 | DIM a(10) as UInteger 2 | LET a(3)(5) = 4 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/let_array_wrong_dims.bas: -------------------------------------------------------------------------------- 1 | DIM a(10) as Byte 2 | LET a(1, 2) = 0 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/let_uminus_bool.bas: -------------------------------------------------------------------------------- 1 | DIM a As Ubyte 2 | 3 | LET a = -(a = a) 4 | 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/letarrstr_substr0.bas: -------------------------------------------------------------------------------- 1 | DIM a$(5) 2 | 3 | b$ = a$(1)(2 TO 4) 'OK 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/lvalue02.bas: -------------------------------------------------------------------------------- 1 | function num: 2 | end function 3 | 4 | let num = 3 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt1_beep_const.bas: -------------------------------------------------------------------------------- 1 | ' Beep with constants 2 | 3 | BEEP 1, 0.0 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt1_shiftli16.bas: -------------------------------------------------------------------------------- 1 | dim num1, num2 as integer 2 | num2 = num1 << 6 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt2_ifband.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as Ubyte 3 | 4 | IF a bAND 1 a = a + 1 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt2_ifbor.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as Ubyte 3 | 4 | IF a bOR 1 a = a + 1 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt3_ldhlhl.bas: -------------------------------------------------------------------------------- 1 | 2 | ASM 3 | ld hl, 0 4 | ld hl, 0 5 | END ASM 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/poke6.bas: -------------------------------------------------------------------------------- 1 | DIM a(1 TO 3) as UInteger 2 | 3 | POKE(Uinteger, a, 5) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/pokeref.bas: -------------------------------------------------------------------------------- 1 | Const U as Uinteger = 0 2 | 3 | POKE UInteger U, 0 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/readbug.bas: -------------------------------------------------------------------------------- 1 | DIM r1 as UByte 2 | READ r1 'Error: No DATA defined 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/strict2.bas: -------------------------------------------------------------------------------- 1 | #pragma strict=true 2 | 3 | sub anysub() 4 | end sub 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/string_substr.bas: -------------------------------------------------------------------------------- 1 | DIM i As UByte 2 | LET a$ = "STRING"(i + 1 TO) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/syntax1.bas: -------------------------------------------------------------------------------- 1 | REM Syntax Error: Unexpected end of file 2 | BORDER a+ 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/valcrash2.bas: -------------------------------------------------------------------------------- 1 | a=val(b$) 2 | a = val(b$+b$) 3 | a = val(inkey$) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/whiletrue.bas: -------------------------------------------------------------------------------- 1 | DIM a as Byte 2 | WHILE 1 3 | a = a + 1 4 | WEND 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/opt1_beep_const.bas: -------------------------------------------------------------------------------- 1 | ' Beep with constants 2 | 3 | BEEP 1, 0.0 4 | -------------------------------------------------------------------------------- /tests/functional/asm/atoloduplbl.asm: -------------------------------------------------------------------------------- 1 | 2 | SetSubScreen: 3 | SetSubScreen: 4 | ld (ix+5), 1 5 | -------------------------------------------------------------------------------- /tests/functional/asm/db_multi.asm: -------------------------------------------------------------------------------- 1 | 2 | DB "Hello", 32, "Worl", 'D' + 32 3 | DB 32, "Hello" 4 | -------------------------------------------------------------------------------- /tests/functional/asm/incbin1.asm: -------------------------------------------------------------------------------- 1 | 2 | ; Includes a file as binary 3 | incbin "incbin1.asm" 4 | -------------------------------------------------------------------------------- /tests/functional/asm/incbin1.bin: -------------------------------------------------------------------------------- 1 | 2 | ; Includes a file as binary 3 | incbin "incbin1.asm" 4 | -------------------------------------------------------------------------------- /tests/functional/asm/neg_par.asm: -------------------------------------------------------------------------------- 1 | ld a, -(5) 2 | ld a, 0-(5) 3 | ld a, +(5) 4 | ld a, 0+(5) 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro42.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro42.bi" 2 | 3 | 4 | #line 6 "prepro42.bi" 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro44.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro44.bi" 2 | 3 | 4 | #line 6 "prepro44.bi" 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro45.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro45.bi" 2 | 3 | 4 | #line 7 "prepro45.bi" 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro46.bi: -------------------------------------------------------------------------------- 1 | #define X(a) a 2 | 3 | #if X(1) 4 | print 1 5 | #endif 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro81.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro81.bi" 2 | 3 | 4 | #line 6 "prepro81.bi" 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/stringizing2.bi: -------------------------------------------------------------------------------- 1 | 2 | 3 | #define z(x) # x 4 | 5 | z("a "" string") 6 | -------------------------------------------------------------------------------- /docs/img/games/dex.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/dex.gif -------------------------------------------------------------------------------- /docs/img/games/h7n9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/h7n9.png -------------------------------------------------------------------------------- /docs/img/games/zen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/zen.png -------------------------------------------------------------------------------- /docs/img/games/zen2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/zen2.png -------------------------------------------------------------------------------- /docs/img/games/zx0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/zx0.png -------------------------------------------------------------------------------- /img/KnightsDemonsDX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/img/KnightsDemonsDX.png -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/array_err.bas: -------------------------------------------------------------------------------- 1 | 2 | dim test(10,1) as ubyte => {{0,0,0,0,0,0,0,0,0,0,0}} 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/atfunc1.bas: -------------------------------------------------------------------------------- 1 | LET a = @myfunc 2 | 3 | function myfunc() 4 | end function 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/atlabel2.bas: -------------------------------------------------------------------------------- 1 | Function test 2 | a = @b 3 | End Function 4 | 5 | b: 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/castF16toF.bas: -------------------------------------------------------------------------------- 1 | DIM a as Fixed = 0 2 | DIM b as Float 3 | 4 | b = a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dim_const0.bas: -------------------------------------------------------------------------------- 1 | CONST xx as UByte = 7 2 | DIM c(1) as Ubyte = {xx, xx} 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/draw.bas: -------------------------------------------------------------------------------- 1 | 2 | DRAW 11,22 3 | DRAW a, 22 4 | DRAW 11, a 5 | DRAW a, b 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/explicit2.bas: -------------------------------------------------------------------------------- 1 | #pragma explicit = True 2 | 3 | FOR a = 1 TO 10: NEXT a 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/explicit4.bas: -------------------------------------------------------------------------------- 1 | #pragma explicit = True 2 | 3 | LET a(TO 5) = "Test" 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/explicit6.bas: -------------------------------------------------------------------------------- 1 | #pragma explicit = true 2 | 3 | POKE @a, 0 4 | 5 | a: 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/forempty.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as Byte 3 | 4 | FOR a = 0 TO 1 STEP 0: NEXT 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifcoendif1.bas: -------------------------------------------------------------------------------- 1 | DIM a as Byte 2 | 3 | IF a < 1 THEN: LET a = a + 1: 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifcoendif2.bas: -------------------------------------------------------------------------------- 1 | DIM a as UByte 2 | 3 | IF a < 1 THEN: LET a = a + 1 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/let_array_substr4.bas: -------------------------------------------------------------------------------- 1 | DIM a(10) as UInteger 2 | LET a(3)(1 TO 5) = 4 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/line_macro.bas: -------------------------------------------------------------------------------- 1 | 2 | 3 | DIM a as Uinteger 4 | 5 | LET a = __LINE__ 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/lvalue01.bas: -------------------------------------------------------------------------------- 1 | const num as uByte = 5 2 | 3 | for num = 0 to 5 4 | next 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt1_shifti16_const.bas: -------------------------------------------------------------------------------- 1 | dim num1, num2 as integer 2 | num2 = num1 >> 3 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt1_shiftu16_const.bas: -------------------------------------------------------------------------------- 1 | dim num1, num2 as uinteger 2 | num2 = num1 >> 3 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt2_incdec_byte.bas: -------------------------------------------------------------------------------- 1 | DIM a as UByte 2 | 3 | a = a + 1 4 | a = a - 1 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt3_fixed.bas: -------------------------------------------------------------------------------- 1 | DIM x, dx as Fixed 2 | 3 | let x = x + dx 4 | POKE x, 0 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/plot.bas: -------------------------------------------------------------------------------- 1 | 2 | PLOT 11,22 3 | PLOT a, 22 4 | PLOT 11, a 5 | PLOT a, b 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/poke5.bas: -------------------------------------------------------------------------------- 1 | DIM a(1 TO 3) as UInteger 2 | 3 | 4 | POKE(UInteger a, 5) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/refconstparam.bas: -------------------------------------------------------------------------------- 1 | 2 | Sub x(a as Uinteger) 3 | x(@a) 4 | End Sub 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/strict6.bas: -------------------------------------------------------------------------------- 1 | 2 | #pragma strict=true 3 | 4 | DIM a = 5 5 | CONST b = 6 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/strict_bool.bas: -------------------------------------------------------------------------------- 1 | 2 | #pragma strict_bool=True 3 | 4 | let a = a < 5 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/substr_expr2.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM i As Uinteger 3 | LET a$ = "STRING"(5 + i) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/tap_incbin.bas: -------------------------------------------------------------------------------- 1 | 2 | ASM 3 | incbin "zxuno/haplofnt.bin" 4 | END ASM 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/whilefalse.bas: -------------------------------------------------------------------------------- 1 | DIM a as Byte 2 | WHILE 0 3 | a = a + 1 4 | WEND 5 | -------------------------------------------------------------------------------- /tests/functional/asm/error_macro.asm: -------------------------------------------------------------------------------- 1 | #warning this is a warning 2 | #error this is an error 3 | nop 4 | -------------------------------------------------------------------------------- /tests/functional/asm/incbin0.asm: -------------------------------------------------------------------------------- 1 | 2 | ; Tries to include a non binary file 3 | incbin "nofile.bin" 4 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro31.bi: -------------------------------------------------------------------------------- 1 | ' Preprocessor bug discovered by LTee 2 | 3 | t(x, (y - 1)) 4 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro37.bi: -------------------------------------------------------------------------------- 1 | /' 2 | This comment should be removed 3 | '/ 4 | 5 | PRINT 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro52.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro52.bi" 2 | 3 | #line 3 "prepro52.bi" 4 | 5 | 1 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro53.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro53.bi" 2 | 3 | #line 3 "prepro53.bi" 4 | 5 | 1 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro85.bi: -------------------------------------------------------------------------------- 1 | REM relative import 2 | 3 | #include "../zxbpp/prepro00.bi" 4 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/spectrum.out: -------------------------------------------------------------------------------- 1 | #line 1 "spectrum.bi" 2 | 3 | 4 | 5 | PRINT "HELLO WORLD!" 6 | -------------------------------------------------------------------------------- /tests/runtime/Makefile: -------------------------------------------------------------------------------- 1 | # vim:ts=4:noet: 2 | 3 | .PHONY: test 4 | 5 | test: 6 | ./test_all 7 | 8 | -------------------------------------------------------------------------------- /docs/img/driver-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/driver-down.png -------------------------------------------------------------------------------- /docs/img/games/9999-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/9999-1.png -------------------------------------------------------------------------------- /docs/img/games/abydos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/abydos.png -------------------------------------------------------------------------------- /docs/img/games/bifrost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/bifrost.png -------------------------------------------------------------------------------- /docs/img/games/bikers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/bikers.png -------------------------------------------------------------------------------- /docs/img/games/bounty.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/bounty.gif -------------------------------------------------------------------------------- /docs/img/games/cnossus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/cnossus.png -------------------------------------------------------------------------------- /docs/img/games/coches.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/coches.png -------------------------------------------------------------------------------- /docs/img/games/lamega.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/lamega.png -------------------------------------------------------------------------------- /docs/img/games/nirvana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/nirvana.png -------------------------------------------------------------------------------- /docs/img/games/o-cman.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/o-cman.gif -------------------------------------------------------------------------------- /docs/img/games/o-trix.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/o-trix.gif -------------------------------------------------------------------------------- /docs/img/games/souls.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/souls.gif -------------------------------------------------------------------------------- /docs/img/games/splash.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/splash.gif -------------------------------------------------------------------------------- /docs/img/games/stela.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/stela.gif -------------------------------------------------------------------------------- /docs/img/games/yithm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/yithm.gif -------------------------------------------------------------------------------- /docs/img/zip-package-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/zip-package-2.png -------------------------------------------------------------------------------- /docs/img/zip-package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/zip-package.png -------------------------------------------------------------------------------- /docs/img/zxbasic_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/zxbasic_logo.png -------------------------------------------------------------------------------- /src/parsetab/tabs.dbm.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/src/parsetab/tabs.dbm.dat -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/60.bas: -------------------------------------------------------------------------------- 1 | 2 | Function test as uByte 3 | end Function 4 | 5 | let a = test 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/61.bas: -------------------------------------------------------------------------------- 1 | 2 | Function test as uByte 3 | end Function 4 | 5 | let a = test() 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/62.bas: -------------------------------------------------------------------------------- 1 | 2 | Function test as uByte 3 | end Function 4 | 5 | let a = test(1) 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/add32a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD32 test 3 | DIM a As ULong 4 | a = a + a + a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/add8a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As Byte 4 | a = a + a + a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/aloadstr0.bas: -------------------------------------------------------------------------------- 1 | REM simple array test 2 | 3 | DIM a$(100) 4 | 5 | b$ = a$(1) 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/arrconst.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a(2, 2) as UInteger 3 | DIM p = @a(0, 0) 4 | p = p 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/atfunc0.bas: -------------------------------------------------------------------------------- 1 | 2 | function myfunc() 3 | end function 4 | 5 | LET a = @myfunc 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/coercion3.bas: -------------------------------------------------------------------------------- 1 | DIM c as Byte = 4 2 | PAPER c 3 | PAPER CAST(Integer, c) * 2 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/data1.bas: -------------------------------------------------------------------------------- 1 | 2 | READ a 3 | 1010 DATA 0 4 | 4500 RESTORE 5000 5 | 5000 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dimconst7.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM c(3, 3) as UBYTE 3 | DIM a as Uinteger = @c(2, 3) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/divf00.bas: -------------------------------------------------------------------------------- 1 | DIM a as FLOAT = 0.5 2 | DIM b as FLOAT = 1 3 | 4 | b = b / 2 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/divf01.bas: -------------------------------------------------------------------------------- 1 | DIM a as FLOAT = 0.5 2 | DIM b as FLOAT = 1 3 | 4 | b = 2 / b 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/divi8a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As Byte 4 | a = a / a / a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/divu8a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As UByte 4 | a = a / a / a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/einar01.bas: -------------------------------------------------------------------------------- 1 | DIM score(1 TO 2) AS UBYTE => {1, 2} 2 | LET score(1) = score(2) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/explicit1.bas: -------------------------------------------------------------------------------- 1 | #pragma explicit = True 2 | DIM a As Ubyte 3 | LET a = b + 1 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/for_err.bas: -------------------------------------------------------------------------------- 1 | DIM i, c as Ubyte 2 | 3 | FOR i = 1 TO 5 4 | LET c = c * 2 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/forsplitted1.bas: -------------------------------------------------------------------------------- 1 | 2 | FOR i=1 TO 8: FOR m=1 TO 6 3 | LET M=0: NEXT m: NEXT i 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifempty3.bas: -------------------------------------------------------------------------------- 1 | DIM i as Byte 2 | 3 | IF i < 0 THEN i = i - 1 ELSE i = i + 1 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifemptyelse.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as Byte 3 | 4 | IF 0 a = a + 1 ELSE a = a - 1 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifendif.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as Byte 3 | 4 | IF a < 0 THEN: a = a + 1 5 | END IF 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/iffor.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as Byte 3 | 4 | IF a < 10 THEN FOR a = 1 TO 10: NEXT a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/lbound0.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a(3 TO 5, 7 TO 9) As UByte 3 | 4 | LET b = LBound(a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/llb.bas: -------------------------------------------------------------------------------- 1 | DIM strTemp as String 2 | 3 | If f$(strTemp)="," then 4 | End If 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ltee3.bas: -------------------------------------------------------------------------------- 1 | 2 | sub test(a as string) 3 | end sub 4 | 5 | test("a string") 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/mul8a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As Byte 4 | a = a * a * a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/mulf00.bas: -------------------------------------------------------------------------------- 1 | DIM a as FLOAT = 0.5 2 | DIM b as FLOAT = 1 3 | 4 | b = b * 2 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/mulf01.bas: -------------------------------------------------------------------------------- 1 | DIM a as FLOAT = 0.5 2 | DIM b as FLOAT = 1 3 | 4 | b = 2 * b 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/mulf16a.bas: -------------------------------------------------------------------------------- 1 | DIM a as FIXED = 0.5 2 | DIM b as FIXED = 1 3 | 4 | b = b * 2 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt1_dim_arr_at5.bas: -------------------------------------------------------------------------------- 1 | DIM a(63, 31) as UByte AT 16384 2 | LET a(0, 0) = 255 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt3_haplo01.bas: -------------------------------------------------------------------------------- 1 | DIM a, b as UInteger 2 | 3 | let a = 19 4 | let a = a + b 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/poke7.bas: -------------------------------------------------------------------------------- 1 | DIM x as ULong 2 | DIM y as UInteger 3 | 4 | POKE ULong y + 1, x 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/print_arrstr.bas: -------------------------------------------------------------------------------- 1 | DIM a$(10) 2 | LET a$(5) = "HELLO WORLD" 3 | PRINT a$(5) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/refconstparam2.bas: -------------------------------------------------------------------------------- 1 | 2 | Sub x(ByVal a As Uinteger) 3 | x(@a) 4 | End Sub 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/refconstparam3.bas: -------------------------------------------------------------------------------- 1 | 2 | Sub x(ByRef a As Uinteger) 3 | x(@a) 4 | End Sub 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/rel_include.bas: -------------------------------------------------------------------------------- 1 | #include once "../zx48k/rel_include.bas" 2 | 3 | LET a = 1 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/save04.bas: -------------------------------------------------------------------------------- 1 | DIM start, length as ULong 2 | 3 | SAVE "scr" CODE start, length 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/sn_crash.bas: -------------------------------------------------------------------------------- 1 | DIM p(10) AS Ubyte 2 | DIM f as String 3 | 4 | LET p(f) = 0 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/strict.bas: -------------------------------------------------------------------------------- 1 | #pragma strict=false 2 | DIM b 3 | #pragma strict=true 4 | DIM a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/sub8a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As Byte 4 | a = a - a - a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/subf00.bas: -------------------------------------------------------------------------------- 1 | DIM a as FLOAT = 0.5 2 | DIM b as FLOAT = 1 3 | 4 | b = b - 2 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/subf01.bas: -------------------------------------------------------------------------------- 1 | DIM a as FLOAT = 0.5 2 | DIM b as FLOAT = 1 3 | 4 | b = 2 - b 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/sys_letsubstr1.bas: -------------------------------------------------------------------------------- 1 | 2 | LET a$ = "HELLO" 3 | LET c$ = "A" 4 | LET a$(1) = c$ 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ubound0.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a(3 TO 5, 7 TO 9) As UByte 3 | 4 | LET b = UBound(a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/while_err.bas: -------------------------------------------------------------------------------- 1 | DIM i, c as Ubyte 2 | 3 | WHILE i = 1 4 | LET c = c * 2 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/add32a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD32 test 3 | DIM a As ULong 4 | a = a + a + a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/add8a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As Byte 4 | a = a + a + a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/divf00.bas: -------------------------------------------------------------------------------- 1 | DIM a as FLOAT = 0.5 2 | DIM b as FLOAT = 1 3 | 4 | b = b / 2 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/divf01.bas: -------------------------------------------------------------------------------- 1 | DIM a as FLOAT = 0.5 2 | DIM b as FLOAT = 1 3 | 4 | b = 2 / b 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/divi8a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As Byte 4 | a = a / a / a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/divu8a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As UByte 4 | a = a / a / a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/mul8a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As Byte 4 | a = a * a * a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/mulf00.bas: -------------------------------------------------------------------------------- 1 | DIM a as FLOAT = 0.5 2 | DIM b as FLOAT = 1 3 | 4 | b = b * 2 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/mulf01.bas: -------------------------------------------------------------------------------- 1 | DIM a as FLOAT = 0.5 2 | DIM b as FLOAT = 1 3 | 4 | b = 2 * b 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/mulf16a.bas: -------------------------------------------------------------------------------- 1 | DIM a as FIXED = 0.5 2 | DIM b as FIXED = 1 3 | 4 | b = b * 2 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/sub8a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As Byte 4 | a = a - a - a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/subf00.bas: -------------------------------------------------------------------------------- 1 | DIM a as FLOAT = 0.5 2 | DIM b as FLOAT = 1 3 | 4 | b = b - 2 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/subf01.bas: -------------------------------------------------------------------------------- 1 | DIM a as FLOAT = 0.5 2 | DIM b as FLOAT = 1 3 | 4 | b = 2 - b 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/ubound0.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a(3 TO 5, 7 TO 9) As UByte 3 | 4 | LET b = UBound(a) 5 | -------------------------------------------------------------------------------- /tests/functional/asm/incbin2.asm: -------------------------------------------------------------------------------- 1 | 2 | ; Tries to include a non binary file 3 | incbin "incbin2.asm", 16 4 | -------------------------------------------------------------------------------- /tests/functional/asm/incbin5.asm: -------------------------------------------------------------------------------- 1 | 2 | ; Tries to include a non binary file 3 | incbin "incbin5.asm", -6 4 | -------------------------------------------------------------------------------- /tests/functional/asm/tmp_label5.asm: -------------------------------------------------------------------------------- 1 | 1: 2 | nop 3 | 1: 4 | ld hl, 1b 5 | ld hl, 2f 6 | 1: 7 | nop 8 | 2: 9 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/once.bi: -------------------------------------------------------------------------------- 1 | 2 | 3 | DIM a as Ubyte 4 | 5 | #pragma once 6 | 7 | DIM b as Ubyte 8 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro06.bi: -------------------------------------------------------------------------------- 1 | 2 | #define test () 3 | ' Must return parenthesis 4 | 5 | func test 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro57.bi: -------------------------------------------------------------------------------- 1 | #define LANG es 2 | #if LANG==es 3 | PRINT "LANG = es" 4 | #endif 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro59.bi: -------------------------------------------------------------------------------- 1 | 2 | #define ASCIIZ(x) (x + CHR$(0)) 3 | 4 | LET a$ = ASCIIZ(a$) 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro61.bi: -------------------------------------------------------------------------------- 1 | #define x(b) xx b a(b) 2 | 3 | #define a(b) aa b x(b) 4 | 5 | x(1) 6 | -------------------------------------------------------------------------------- /docs/architectures/sectionz.md: -------------------------------------------------------------------------------- 1 | # SectionZ 2 | 3 | * http://www.system16.com/hardware.php?id=789&gid=51#51 4 | -------------------------------------------------------------------------------- /docs/architectures/taitof2.md: -------------------------------------------------------------------------------- 1 | # TaitoF2 2 | 3 | * http://www.system16.com/hardware.php?id=653&gid=1604#1604 4 | -------------------------------------------------------------------------------- /docs/architectures/taitof3.md: -------------------------------------------------------------------------------- 1 | # TaitoF3 2 | 3 | * http://mamedev.org/source/src/mame/drivers/taito_f3.c.html 4 | -------------------------------------------------------------------------------- /docs/architectures/taitoh.md: -------------------------------------------------------------------------------- 1 | # TaitoH 2 | 3 | * http://mamedev.org/source/src/mame/drivers/taito_h.c.html 4 | -------------------------------------------------------------------------------- /docs/architectures/taitol.md: -------------------------------------------------------------------------------- 1 | # TaitoL 2 | 3 | * http://mamedev.org/source/src/mame/drivers/taito_l.c.html 4 | -------------------------------------------------------------------------------- /docs/architectures/taitox.md: -------------------------------------------------------------------------------- 1 | # TaitoX 2 | 3 | * http://mamedev.org/source/src/mame/drivers/taito_x.c.html 4 | -------------------------------------------------------------------------------- /docs/architectures/taitoz.md: -------------------------------------------------------------------------------- 1 | # TaitoZ 2 | 3 | * http://mamedev.org/source/src/mame/drivers/taito_z.c.html 4 | -------------------------------------------------------------------------------- /docs/img/games/ad_lunam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/ad_lunam.png -------------------------------------------------------------------------------- /docs/img/games/bacaball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/bacaball.png -------------------------------------------------------------------------------- /docs/img/games/bacachase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/bacachase.png -------------------------------------------------------------------------------- /docs/img/games/berksman.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/berksman.gif -------------------------------------------------------------------------------- /docs/img/games/bifrost2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/bifrost2.png -------------------------------------------------------------------------------- /docs/img/games/cabezooon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/cabezooon.png -------------------------------------------------------------------------------- /docs/img/games/cuadragon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/cuadragon.png -------------------------------------------------------------------------------- /docs/img/games/empareja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/empareja.png -------------------------------------------------------------------------------- /docs/img/games/encuerer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/encuerer.gif -------------------------------------------------------------------------------- /docs/img/games/hobbitel.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/hobbitel.gif -------------------------------------------------------------------------------- /docs/img/games/jrpgtest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/jrpgtest.png -------------------------------------------------------------------------------- /docs/img/games/maritrini.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/maritrini.gif -------------------------------------------------------------------------------- /docs/img/games/memorama.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/memorama.png -------------------------------------------------------------------------------- /docs/img/games/ratulzeki.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/ratulzeki.gif -------------------------------------------------------------------------------- /docs/img/games/saltarin.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/saltarin.gif -------------------------------------------------------------------------------- /docs/img/games/solitario.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/solitario.png -------------------------------------------------------------------------------- /docs/img/games/uchidanza.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/uchidanza.png -------------------------------------------------------------------------------- /docs/img/games/vaderetro.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/vaderetro.gif -------------------------------------------------------------------------------- /docs/img/games/zxstriker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/zxstriker.png -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/70.bas: -------------------------------------------------------------------------------- 1 | 2 | LET b = 10 3 | LET a = SIN COS TAN ABS LN EXP SQR b 4 | LET b = a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/add16a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD16 tests 3 | DIM a As Integer 4 | a = a + a + a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/add32b.bas: -------------------------------------------------------------------------------- 1 | REM another ADD32 test 2 | DIM a As Long 3 | a = a + a + (a + 2 + a) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/addf.bas: -------------------------------------------------------------------------------- 1 | REM another Float test 2 | DIM a As Float 3 | a = a + a + (a + 2 + a) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/addf16a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADDF16 tests 3 | DIM a As Fixed 4 | a = a + a + a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/arraycopy5.bas: -------------------------------------------------------------------------------- 1 | DIM a$(3) 2 | DIM c$(3) 3 | 4 | a$(1) = "Hello world" 5 | c$ = a$ 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dim_arr_at_label0.bas: -------------------------------------------------------------------------------- 1 | REM arrat at label 2 | DIM a(5) as Ubyte AT @c 3 | 4 | c: 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dim_at_label0.bas: -------------------------------------------------------------------------------- 1 | 2 | 3 | somelabel: 4 | 5 | DIM x as UInteger at @somelabel 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dim_at_label5.bas: -------------------------------------------------------------------------------- 1 | REM Error: circular dependency 2 | 3 | DIM x as Ubyte at @x 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/divf16a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another DIV Fixed tests 3 | DIM a As Fixed 4 | a = a / a / a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/divi16a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another DIV16 test 3 | DIM a As UInteger 4 | a = a / a / a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/divu16a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another DIVU16 test 3 | DIM a As UInteger 4 | a = a / a / a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/elseif2.bas: -------------------------------------------------------------------------------- 1 | DIM a AS Byte 2 | IF a < 0 THEN REM 3 | ELSEIF a > 0 THEN 4 | END IF 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/endif.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as UByte 3 | 4 | IF a < 0 THEN 5 | a = a + 1 6 | ENDIF 7 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/equ32.bas: -------------------------------------------------------------------------------- 1 | DIM a as ULong 2 | 3 | IF a = 5 THEN 4 | LET a = a + 1 5 | END IF 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/equ8.bas: -------------------------------------------------------------------------------- 1 | DIM a as UByte 2 | 3 | IF a = 5 THEN 4 | LET a = a + 1 5 | END IF 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/equf.bas: -------------------------------------------------------------------------------- 1 | DIM a as Float 2 | 3 | IF a = 5 THEN 4 | LET a = a + 1 5 | END IF 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/forsplitted.bas: -------------------------------------------------------------------------------- 1 | 2 | 30 FOR i=1 TO 8: FOR m=1 TO 6 3 | 40 LET M=0: NEXT m: NEXT i 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/gti8.bas: -------------------------------------------------------------------------------- 1 | DIM a as Byte 2 | 3 | IF a > 5 THEN 4 | LET a = a + 1 5 | END IF 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/gtu8.bas: -------------------------------------------------------------------------------- 1 | DIM a as UByte 2 | 3 | IF a > 5 THEN 4 | LET a = a + 1 5 | END IF 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifelse3.bas: -------------------------------------------------------------------------------- 1 | DIM i as Byte 2 | 3 | IF i < 0 THEN LET i = i + 1 ELSE i = i - 1 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifempty6.bas: -------------------------------------------------------------------------------- 1 | DIM i as Byte 2 | 3 | IF 0 THEN i = i + 1 ELSE i = i - 1: END IF 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/labeldecl.bas: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 DIM a as Byte 4 | 20 DIM b as Byte : DIM c as Byte 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/lbound1.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a(3 TO 5, 7 TO 9) As UByte 3 | 4 | LET b = LBound(a, 0) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/lbound3.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a(3 TO 5, 7 TO 9) As UByte 3 | 4 | LET c = LBound(a, 1) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/load02.bas: -------------------------------------------------------------------------------- 1 | dim variableToSave as uinteger 2 | load "test1" DATA variableToSave 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/lvalue03.bas: -------------------------------------------------------------------------------- 1 | function num: 2 | end function 3 | 4 | for num = 1 to 2 5 | next 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/modi8a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another MOD8 tests 3 | DIM a As Byte 4 | a = a mod a mod a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/modu8a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As UByte 4 | a = a mod a mod a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/mul16a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another MUL16 test 3 | DIM a As Integer 4 | a = a * a * a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt2_pstr.bas: -------------------------------------------------------------------------------- 1 | sub PRINT642(c as STRING) 2 | END SUB 3 | 4 | PRINT642("Hola2") 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/optional_param0.bas: -------------------------------------------------------------------------------- 1 | 2 | sub test(x as Uinteger = 0) 3 | end sub 4 | 5 | test() 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/refconstparam6.bas: -------------------------------------------------------------------------------- 1 | b: 2 | 3 | Sub x(a as Uinteger) 4 | x(@b) 5 | End Sub 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/restore0.bas: -------------------------------------------------------------------------------- 1 | REM should be ignored since there's no READ sentence 2 | restore 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/save01.bas: -------------------------------------------------------------------------------- 1 | const BasePtr as uinteger = 32768 2 | save "Contents"code BasePtr, 25 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/save02.bas: -------------------------------------------------------------------------------- 1 | dim variableToSave as uinteger 2 | save "test1" DATA variableToSave 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/str01.bas: -------------------------------------------------------------------------------- 1 | REM STR test 2 | 3 | ' Simple STR 4 | LET b = 50 5 | LET a$ = STR(b) 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/strict5.bas: -------------------------------------------------------------------------------- 1 | #pragma strict=true 2 | 3 | DIM a, b as Byte 4 | DIM c 5 | DIM e, f 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/sub16a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another SUB16 tests 3 | DIM a As Uinteger 4 | a = a - a - a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ubound1.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a(3 TO 5, 7 TO 9) As UByte 3 | 4 | LET b = UBound(a, 0) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ubound3.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a(3 TO 5, 7 TO 9) As UByte 3 | 4 | LET c = UBound(a, 1) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/add16a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD16 tests 3 | DIM a As Integer 4 | a = a + a + a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/add32b.bas: -------------------------------------------------------------------------------- 1 | REM another ADD32 test 2 | DIM a As Long 3 | a = a + a + (a + 2 + a) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/addf.bas: -------------------------------------------------------------------------------- 1 | REM another Float test 2 | DIM a As Float 3 | a = a + a + (a + 2 + a) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/addf16a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADDF16 tests 3 | DIM a As Fixed 4 | a = a + a + a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/divi16a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another DIV16 test 3 | DIM a As UInteger 4 | a = a / a / a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/divu16a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another DIVU16 test 3 | DIM a As UInteger 4 | a = a / a / a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/equ32.bas: -------------------------------------------------------------------------------- 1 | DIM a as ULong 2 | 3 | IF a = 5 THEN 4 | LET a = a + 1 5 | END IF 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/equ8.bas: -------------------------------------------------------------------------------- 1 | DIM a as UByte 2 | 3 | IF a = 5 THEN 4 | LET a = a + 1 5 | END IF 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/equf.bas: -------------------------------------------------------------------------------- 1 | DIM a as Float 2 | 3 | IF a = 5 THEN 4 | LET a = a + 1 5 | END IF 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/gti8.bas: -------------------------------------------------------------------------------- 1 | DIM a as Byte 2 | 3 | IF a > 5 THEN 4 | LET a = a + 1 5 | END IF 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/gtu8.bas: -------------------------------------------------------------------------------- 1 | DIM a as UByte 2 | 3 | IF a > 5 THEN 4 | LET a = a + 1 5 | END IF 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/modi8a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another MOD8 tests 3 | DIM a As Byte 4 | a = a mod a mod a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/modu8a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As UByte 4 | a = a mod a mod a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/mul16a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another MUL16 test 3 | DIM a As Integer 4 | a = a * a * a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/sub16a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another SUB16 tests 3 | DIM a As Uinteger 4 | a = a - a - a 5 | -------------------------------------------------------------------------------- /tests/functional/asm/incbin3.asm: -------------------------------------------------------------------------------- 1 | 2 | ; Tries to include a non binary file 3 | incbin "incbin3.asm", 16, 2 4 | -------------------------------------------------------------------------------- /tests/functional/asm/incbin4.asm: -------------------------------------------------------------------------------- 1 | 2 | ; Tries to include a non binary file 3 | incbin "incbin4.asm", -5, 2 4 | -------------------------------------------------------------------------------- /tests/functional/asm/ltee11.asm: -------------------------------------------------------------------------------- 1 | label: 2 | ld a, (label) 3 | ld a, [label] 4 | ld a, (label) + 0 5 | -------------------------------------------------------------------------------- /tests/functional/asm/tmp_label0.asm: -------------------------------------------------------------------------------- 1 | 1: 2 | ld hl, 1b 3 | ld hl, (1b) 4 | ld hl, 1f 5 | ld hl, (1f) 6 | 1: 7 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/line_asm.bi: -------------------------------------------------------------------------------- 1 | ASM 2 | NOP 3 | #line 25 4 | END ASM 5 | #warning this should be line 26 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro63.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro63.bi" 2 | 3 | 4 | #line 4 "prepro63.bi" 5 | 6 | XX5 7 | -------------------------------------------------------------------------------- /docs/architectures/apple_ii.md: -------------------------------------------------------------------------------- 1 | # Apple II 2 | 3 | * Applesoft Basic: http://www.txbobsc.com/scsc/scdocumentor/ 4 | -------------------------------------------------------------------------------- /docs/architectures/capcom1942.md: -------------------------------------------------------------------------------- 1 | # Capcom1942 2 | 3 | * http://mamedev.org/source/src/mame/drivers/1942.c.html 4 | -------------------------------------------------------------------------------- /docs/architectures/capcom1943.md: -------------------------------------------------------------------------------- 1 | # Capcom1943 2 | 3 | * http://mamedev.org/source/src/mame/drivers/1943.c.html 4 | -------------------------------------------------------------------------------- /docs/architectures/segamodel1.md: -------------------------------------------------------------------------------- 1 | # SegaModel1 2 | 3 | * http://mamedev.org/source/src/mame/drivers/model1.c.html 4 | -------------------------------------------------------------------------------- /docs/architectures/segamodel2.md: -------------------------------------------------------------------------------- 1 | # SegaModel2 2 | 3 | * http://mamedev.org/source/src/mame/drivers/model2.c.html 4 | -------------------------------------------------------------------------------- /docs/architectures/segamodel3.md: -------------------------------------------------------------------------------- 1 | # SegaModel3 2 | 3 | * http://mamedev.org/source/src/mame/drivers/model3.c.html 4 | -------------------------------------------------------------------------------- /docs/architectures/segaoutrun.md: -------------------------------------------------------------------------------- 1 | # SegaOutrun 2 | 3 | * http://www.system16.com/hardware.php?id=697&gid=1843#1843 4 | -------------------------------------------------------------------------------- /docs/architectures/taitoair.md: -------------------------------------------------------------------------------- 1 | # TaitoAir 2 | 3 | * http://mamedev.org/source/src/mame/drivers/taitoair.c.html 4 | -------------------------------------------------------------------------------- /docs/img/games/3reyesmagos.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/3reyesmagos.gif -------------------------------------------------------------------------------- /docs/img/games/binaryland.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/binaryland.png -------------------------------------------------------------------------------- /docs/img/games/breakspace.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/breakspace.gif -------------------------------------------------------------------------------- /docs/img/games/brokenfriend.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/brokenfriend.gif -------------------------------------------------------------------------------- /docs/img/games/explorer_scr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/explorer_scr.png -------------------------------------------------------------------------------- /docs/img/games/fourspriter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/fourspriter.png -------------------------------------------------------------------------------- /docs/img/games/hobbitel_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/hobbitel_2.gif -------------------------------------------------------------------------------- /docs/img/games/italia1944.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/italia1944.png -------------------------------------------------------------------------------- /docs/img/games/multiioboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/multiioboard.png -------------------------------------------------------------------------------- /docs/img/games/nirvanaplus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/nirvanaplus.png -------------------------------------------------------------------------------- /docs/img/games/pixelquest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/pixelquest.png -------------------------------------------------------------------------------- /docs/img/games/pvaprologue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/pvaprologue.png -------------------------------------------------------------------------------- /docs/img/games/retrobsesion.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/retrobsesion.gif -------------------------------------------------------------------------------- /docs/img/games/speccywars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/speccywars.png -------------------------------------------------------------------------------- /docs/img/games/zxconnection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/zxconnection.png -------------------------------------------------------------------------------- /docs/img/games/zxdestroyer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/zxdestroyer.png -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/33.bas: -------------------------------------------------------------------------------- 1 | 2 | function test(byval a as uByte) as float 3 | return 1 4 | end function 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/64.bas: -------------------------------------------------------------------------------- 1 | 2 | Function FASTCALL test as uByte 3 | end Function 4 | 5 | let a = test 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/add8b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As Byte 4 | a = a + a + (a + 2 + a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/arden2.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM c As Uinteger 3 | DIM result$ 4 | LET result = result + CHR$(c) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/array08.bas: -------------------------------------------------------------------------------- 1 | DIM a$(10) 2 | DIM b as Uinteger 3 | DIM s as String 4 | 5 | a$(b) = s 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/byte_neq.bas: -------------------------------------------------------------------------------- 1 | DIM a as Byte 2 | 3 | IF a <> 5 THEN 4 | LET a = a + 1 5 | END IF 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/const_str.bas: -------------------------------------------------------------------------------- 1 | CONST a = "Hello World" 2 | 3 | LET b = a 4 | LET b = "Hello World" 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/def_func_inline_for_next.bas: -------------------------------------------------------------------------------- 1 | 2 | FUNCTION f(): FOR i = 1 TO 5: NEXT: END FUNCTION 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dim_at_label1.bas: -------------------------------------------------------------------------------- 1 | 2 | 3 | somelabel: 4 | 5 | DIM x as UInteger at @somelabel + 1 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/divi8b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As Byte 4 | a = a / a / (a / 2 / a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/divu8b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As UByte 4 | a = a / a / (a / 2 / a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/doloop4.bas: -------------------------------------------------------------------------------- 1 | REM DO..LOOP syntax test 2 | 3 | 4 | 10 DO 5 | 20 LOOP 6 | 7 | GOTO 20 8 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/due_crash.bas: -------------------------------------------------------------------------------- 1 | function test(code as Ubyte) as Ubyte 2 | return 1 3 | end Function 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/emptystrparam.bas: -------------------------------------------------------------------------------- 1 | SUB stringtest (thing as string) 2 | END SUB 3 | 4 | stringtest("") 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/equ16.bas: -------------------------------------------------------------------------------- 1 | DIM a as UInteger 2 | 3 | IF a = 5 THEN 4 | LET a = a + 1 5 | END IF 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/explicit3.bas: -------------------------------------------------------------------------------- 1 | #pragma explicit = True 2 | 3 | DIM a as String 4 | LET a = b(TO 5) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/forsplitted0.bas: -------------------------------------------------------------------------------- 1 | 10 DIM i as Byte 2 | 20 FOR i = 1 TO 10 3 | 30 LET i = i + 1: NEXT i 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/gosub_in_func.bas: -------------------------------------------------------------------------------- 1 | 2 | SUB test 3 | GOSUB b: REM Not allowed 4 | b: 5 | END SUB 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifelse0.bas: -------------------------------------------------------------------------------- 1 | if 1 < 2 then 2 | 3 | else 4 | print "Can't happen!" 5 | end if 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/iffor1.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as Byte 3 | 4 | IF a < 10 THEN FOR a = 1 TO 10 5 | NEXT a 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/let_array_substr7.bas: -------------------------------------------------------------------------------- 1 | DIM a$(10) 2 | LET a$(3) = "0123456789" 3 | a$(3)(1) = "HELLO" 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/mul8b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As Byte 4 | a = a * a * (a * 2 * a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/octal.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as Ubyte = 75o : REM Octal 3 | DIM b as Ubyte = 61 : REM Decimal 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt1_arr_at_init.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a(10, 10) as UInteger 3 | DIM p as UInteger = @a(0, 0) 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt1_beep_var.bas: -------------------------------------------------------------------------------- 1 | ' Beep with constants 2 | 3 | DIM a as Float = 1 4 | BEEP a, 0.0 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt2_ifbyte.bas: -------------------------------------------------------------------------------- 1 | DIM a as UByte 2 | 3 | if a = 64 then 4 | a = a + 1 5 | end if 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/pokeref1.bas: -------------------------------------------------------------------------------- 1 | sub test 2 | Const U as Uinteger = 0 3 | POKE UInteger U, 0 4 | end sub 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/refconstparam5.bas: -------------------------------------------------------------------------------- 1 | 2 | Sub x(a as Uinteger) 3 | x(@b) 4 | End Sub 5 | 6 | b: 7 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/sub8b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As Byte 4 | a = a - a - (a - 2 - a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/sys_letsubstr2.bas: -------------------------------------------------------------------------------- 1 | 2 | LET a$ = "HELLO" 3 | LET c$ = "A" 4 | LET a$(1) = c$ + "A" 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/add8b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As Byte 4 | a = a + a + (a + 2 + a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/array08.bas: -------------------------------------------------------------------------------- 1 | DIM a$(10) 2 | DIM b as Uinteger 3 | DIM s as String 4 | 5 | a$(b) = s 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/arraycopy5.bas: -------------------------------------------------------------------------------- 1 | DIM a$(3) 2 | DIM c$(3) 3 | 4 | a$(1) = "Hello world" 5 | c$ = a$ 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/divf16a.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another DIV Fixed tests 3 | DIM a As Fixed 4 | a = a / a / a 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/divi8b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As Byte 4 | a = a / a / (a / 2 / a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/divu8b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As UByte 4 | a = a / a / (a / 2 / a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/equ16.bas: -------------------------------------------------------------------------------- 1 | DIM a as UInteger 2 | 3 | IF a = 5 THEN 4 | LET a = a + 1 5 | END IF 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/gei8.bas: -------------------------------------------------------------------------------- 1 | DIM a as Byte 2 | 3 | IF a >= 5 THEN 4 | POKE 16384, 255 5 | END IF 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/mul8b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As Byte 4 | a = a * a * (a * 2 * a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/opt1_beep_var.bas: -------------------------------------------------------------------------------- 1 | ' Beep with constants 2 | 3 | DIM a as Float = 1 4 | BEEP a, 0.0 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/sub8b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As Byte 4 | a = a - a - (a - 2 - a) 5 | -------------------------------------------------------------------------------- /tests/functional/asm/align.asm: -------------------------------------------------------------------------------- 1 | ;; ALign test 2 | align 256 3 | db 1 4 | align 32 5 | db 2 6 | align 3 7 | db 3 8 | -------------------------------------------------------------------------------- /tests/functional/asm/jphl.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/jphl.bin -------------------------------------------------------------------------------- /tests/functional/asm/ldix.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/ldix.bin -------------------------------------------------------------------------------- /tests/functional/asm/ldix1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/ldix1.bin -------------------------------------------------------------------------------- /tests/functional/asm/opers.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/opers.bin -------------------------------------------------------------------------------- /tests/functional/asm/orgasm.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/orgasm.bin -------------------------------------------------------------------------------- /tests/functional/asm/paren.asm: -------------------------------------------------------------------------------- 1 | __LABEL__UDGS: 2 | ld hl, (__LABEL__UDGS) / (256) 3 | ld a, (__LABEL__UDGS) / (256) 4 | -------------------------------------------------------------------------------- /tests/functional/asm/undoc.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/undoc.bin -------------------------------------------------------------------------------- /tests/functional/zxbpp/once.out: -------------------------------------------------------------------------------- 1 | #line 1 "once.bi" 2 | 3 | 4 | DIM a as Ubyte 5 | 6 | 7 | 8 | DIM b as Ubyte 9 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro02.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro02.bi" 2 | 3 | 4 | 5 | 6 | #line 6 "prepro02.bi" 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro06.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro06.bi" 2 | 3 | #line 3 "prepro06.bi" 4 | 5 | 6 | func () 7 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro10.bi: -------------------------------------------------------------------------------- 1 | 2 | 3 | function test(byval a as byte) 4 | let test = 0 5 | end function 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro28.bi: -------------------------------------------------------------------------------- 1 | 'Raises an error with a mistipped directive 2 | 3 | #defien HELLOWORLD "Hello" 4 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro43.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro43.bi" 2 | 3 | 4 | 5 | print 1 6 | #line 6 "prepro43.bi" 7 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro46.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro46.bi" 2 | 3 | 4 | 5 | print 1 6 | #line 6 "prepro46.bi" 7 | -------------------------------------------------------------------------------- /docs/architectures/c64.md: -------------------------------------------------------------------------------- 1 | # C64 2 | 3 | * http://sta.c64.org/cbm64mem.html 4 | * http://www.villehelin.com/wla.html 5 | -------------------------------------------------------------------------------- /docs/architectures/namcogalaga.md: -------------------------------------------------------------------------------- 1 | # NamcoGalaga 2 | 3 | * http://mamedev.org/source/src/mame/drivers/galaga.c.html 4 | -------------------------------------------------------------------------------- /docs/architectures/pv2000.md: -------------------------------------------------------------------------------- 1 | # PV2000 2 | 3 | * https://github.com/mamedev/mame/blob/master/src/mess/drivers/pv2000.c 4 | -------------------------------------------------------------------------------- /docs/architectures/shaolinsroad.md: -------------------------------------------------------------------------------- 1 | # ShaolinsRoad 2 | 3 | * http://mamedev.org/source/src/mame/drivers/shaolins.c.html 4 | -------------------------------------------------------------------------------- /docs/img/games/ad_lunam_plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/ad_lunam_plus.png -------------------------------------------------------------------------------- /docs/img/games/cuadragon_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/cuadragon_next.png -------------------------------------------------------------------------------- /docs/img/games/p3efilebrowser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/p3efilebrowser.png -------------------------------------------------------------------------------- /docs/img/games/pixelquest2000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/pixelquest2000.png -------------------------------------------------------------------------------- /docs/img/games/pixelquestzero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/pixelquestzero.png -------------------------------------------------------------------------------- /docs/img/games/retrobsesionii.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/retrobsesionii.gif -------------------------------------------------------------------------------- /src/lib/arch/zx48k/runtime/bool/xor16.asm: -------------------------------------------------------------------------------- 1 | 2 | ; XOR16 implemented in XOR8.ASM file 3 | #include once 4 | -------------------------------------------------------------------------------- /src/lib/arch/zxnext/runtime/bool/xor16.asm: -------------------------------------------------------------------------------- 1 | 2 | ; XOR16 implemented in XOR8.ASM file 3 | #include once 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/32.bas: -------------------------------------------------------------------------------- 1 | 2 | function test(byval a as uByte) as float 3 | let a = a + 1 4 | end function 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/34.bas: -------------------------------------------------------------------------------- 1 | 2 | function test(byval a as uByte) as float 3 | return a + 1 4 | end function 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/35.bas: -------------------------------------------------------------------------------- 1 | 2 | function test(byval a as uByte) as float 3 | return a + b 4 | end function 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/add16b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD16 tests 3 | DIM a As Integer 4 | a = a + a + (a + 2 + a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/addf16b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADDF16 test 3 | DIM a As Fixed 4 | a = a + a + (a + 2 + a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/array11.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM A as UInteger = 0 3 | 4 | DIM array(1 TO 3) AS UINTEGER = { A, 0, 0 } 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/array12.bas: -------------------------------------------------------------------------------- 1 | DIM a$(10, 10) 2 | DIM b as Uinteger 3 | DIM s as String 4 | 5 | a$(b, b) = s 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/arrlabels2.bas: -------------------------------------------------------------------------------- 1 | 2 | 3 | DIM a(1 TO 3) as UInteger => {@a, @a, @a + 1} 4 | POKE a(1), 5 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/bound00.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a(2 TO 8) as integer 3 | 4 | LET b = Ubound(a) 5 | LET c = Lbound(a) 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/const_str6.bas: -------------------------------------------------------------------------------- 1 | CONST ConstStr As String = "string" 2 | 3 | DIM s As String = ConstStr 4 | 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dim_at_label3.bas: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DIM x as UInteger at @somelabel 6 | 7 | somelabel: 8 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dim_dyn_err.bas: -------------------------------------------------------------------------------- 1 | dim r(0 to r) as ulong => {40000, 35000, 30000, 25000, 20000, 15000, 10000} 2 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dim_test0.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a AT @c(1, 5) 3 | DIM c(10, 10) as UBYTE 4 | 5 | const q = @c(2, 3) 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/divf16b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD Fixed tests 3 | DIM a As Fixed 4 | a = a / a / (a / 2 / a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/divi16b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another DIV16 test 3 | DIM a As UInteger 4 | a = a / a / (a / 2 / a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/divu16b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another DIVU16 test 3 | DIM a As UInteger 4 | a = a / a / (a / 2 / a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dup_func_decl.bas: -------------------------------------------------------------------------------- 1 | 2 | 3 | declare function f() as float 4 | 5 | declare function f() 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/for0.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM x, y as byte 3 | 4 | 5 | for x=-128 to 126 6 | let y = x 7 | next x 8 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/funccall0.bas: -------------------------------------------------------------------------------- 1 | 2 | Function test(x) as Byte 3 | return test(0x100) 4 | End Function 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/keyword_arg3.bas: -------------------------------------------------------------------------------- 1 | 2 | Function test as uByte 3 | end Function 4 | 5 | let a = test(z:=1) 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/let_array_substr10.bas: -------------------------------------------------------------------------------- 1 | DIM a$(10) 2 | LET a(4) = "0123456789" 3 | LET a(4, TO 3) = "HELLO" 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/let_array_substr11.bas: -------------------------------------------------------------------------------- 1 | DIM a$(10) 2 | LET a(3) = "0123456789" 3 | LET a(3, TO) = "HELLO" 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/let_array_substr13.bas: -------------------------------------------------------------------------------- 1 | DIM a$(10) 2 | LET a(3) = "0123456789" 3 | LET a(3, 5) = "HELLO" 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/let_array_substr3.bas: -------------------------------------------------------------------------------- 1 | DIM a$(10) 2 | LET a$(3) = "0123456789" 3 | a$(3)(1 TO 5) = "HELLO" 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/let_array_substr9.bas: -------------------------------------------------------------------------------- 1 | DIM a$(10) 2 | LET a(3) = "0123456789" 3 | LET a(3, 1 TO) = "HELLO" 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/mul16b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD16 tests 3 | DIM a As Integer 4 | a = a * a * (a * 2 * a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt1_dim_arr_global2.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a(5) as UByte => {0, 1, 2, 3, 4, 5} 3 | 4 | POKE 0, a(2) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt2_labelinfunc.bas: -------------------------------------------------------------------------------- 1 | POKE @label1, 5 2 | 3 | sub procedure 4 | label1: 5 | 6 | end sub 7 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt2_unused_var1.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as UByte = 1 'should compile nothing and emit a warning 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt4_keepix.bas: -------------------------------------------------------------------------------- 1 | 2 | SUB test() 3 | a = RND * 5 4 | a = a + 1 5 | END SUB 6 | 7 | test 8 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/paramint3.bas: -------------------------------------------------------------------------------- 1 | DIM a as UInteger 2 | p(a) 3 | 4 | 5 | sub p(a as UInteger) 6 | end sub 7 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/str02.bas: -------------------------------------------------------------------------------- 1 | 'Simple add str 2 | 3 | DIM b as Uinteger = 2 4 | LET a$ = "Hello " + str$(b) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/sub16b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another SUB16 test 3 | DIM a As UInteger 4 | a = a - a - (a - 2 - a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/substr_err.bas: -------------------------------------------------------------------------------- 1 | IF k$<>s$ THEN REM 2 | IF m$(s(1),s(2))="\b" THEN LET m$(s(1),s(2))="\c" 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/whilefalse1.bas: -------------------------------------------------------------------------------- 1 | DIM a as Byte 2 | WHILE 0 3 | BAD: 4 | a = a + 1 5 | WEND 6 | GOTO BAD 7 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/add16b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD16 tests 3 | DIM a As Integer 4 | a = a + a + (a + 2 + a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/addf16b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADDF16 test 3 | DIM a As Fixed 4 | a = a + a + (a + 2 + a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/bound00.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a(2 TO 8) as integer 3 | 4 | LET b = Ubound(a) 5 | LET c = Lbound(a) 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/divi16b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another DIV16 test 3 | DIM a As UInteger 4 | a = a / a / (a / 2 / a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/divu16b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another DIVU16 test 3 | DIM a As UInteger 4 | a = a / a / (a / 2 / a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/mul16b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD16 tests 3 | DIM a As Integer 4 | a = a * a * (a * 2 * a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/sub16b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another SUB16 test 3 | DIM a As UInteger 4 | a = a - a - (a - 2 - a) 5 | -------------------------------------------------------------------------------- /tests/functional/asm/asm_lb_ix_rb.asm: -------------------------------------------------------------------------------- 1 | 2 | LD a, [ix + 0] 3 | LD [ix + 0], a 4 | 5 | LD a, [iy + 0] 6 | LD [iy + 0], a 7 | -------------------------------------------------------------------------------- /tests/functional/asm/asmcolon.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/asmcolon.bin -------------------------------------------------------------------------------- /tests/functional/asm/hex_num1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/hex_num1.bin -------------------------------------------------------------------------------- /tests/functional/asm/init_dot.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/init_dot.bin -------------------------------------------------------------------------------- /tests/functional/asm/jp1f_bad.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/jp1f_bad.bin -------------------------------------------------------------------------------- /tests/functional/asm/neg_par.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/neg_par.bin -------------------------------------------------------------------------------- /tests/functional/asm/prepro35.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/prepro35.bin -------------------------------------------------------------------------------- /tests/functional/asm/print42.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/print42.bin -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro02.bi: -------------------------------------------------------------------------------- 1 | #define TEST 2 | 3 | #ifdef TEST 4 | REM This is OK 5 | #endif 6 | 7 | REM End 8 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro20.bi: -------------------------------------------------------------------------------- 1 | ' Must return 2 | ' PRINT ;) 3 | 4 | #define macro(x) PRINT x; 5 | 6 | macro()) 7 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro20.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro20.bi" 2 | 3 | 4 | 5 | #line 5 "prepro20.bi" 6 | 7 | PRINT ;) 8 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro25.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro25.bi" 2 | 3 | 4 | 5 | #line 5 "prepro25.bi" 6 | 7 | (x + y) * 2 8 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro47.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro47.bi" 2 | 3 | #line 3 "prepro47.bi" 4 | 5 | #line 8 "prepro47.bi" 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro48.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro48.bi" 2 | 3 | #line 3 "prepro48.bi" 4 | 5 | #line 8 "prepro48.bi" 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro49.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro49.bi" 2 | 3 | #line 3 "prepro49.bi" 4 | 5 | #line 8 "prepro49.bi" 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro54.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro54.bi" 2 | 3 | #line 3 "prepro54.bi" 4 | 5 | #line 7 "prepro54.bi" 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro56.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro56.bi" 2 | 3 | #line 3 "prepro56.bi" 4 | 5 | #line 7 "prepro56.bi" 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro57.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro57.bi" 2 | 3 | 4 | PRINT "LANG = es" 5 | #line 5 "prepro57.bi" 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro61.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro61.bi" 2 | 3 | 4 | #line 4 "prepro61.bi" 5 | 6 | xx 1 aa 1 x(1) 7 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro62.bi: -------------------------------------------------------------------------------- 1 | 2 | #define q z 3 | #define z(a, b) (a + 1, b + 2) 4 | 5 | z(1, 2) 6 | q(3, 4) 7 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro81.bi: -------------------------------------------------------------------------------- 1 | #define SCREEN_W1 5 2 | 3 | #if SCREEN_W == 5 4 | LET a$ = "test" 5 | #endif 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/stringizing0.out: -------------------------------------------------------------------------------- 1 | #line 1 "stringizing0.bi" 2 | 3 | 4 | #line 4 "stringizing0.bi" 5 | 6 | "1" 7 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/stringizing1.bi: -------------------------------------------------------------------------------- 1 | 2 | 3 | #define x(a, b) q(a##b) 4 | #define q(a) #a 5 | 6 | x(a, b) 7 | q(5) 8 | -------------------------------------------------------------------------------- /docs/architectures/alphatronicpc.md: -------------------------------------------------------------------------------- 1 | # AlphatronicPC 2 | 3 | * http://www.old-computers.com/museum/computer.asp?st=1&c=241 4 | -------------------------------------------------------------------------------- /docs/img/games/chessboardattack.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/chessboardattack.gif -------------------------------------------------------------------------------- /docs/img/games/ciclopesysaturno.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/ciclopesysaturno.png -------------------------------------------------------------------------------- /docs/img/games/earthraidingame.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/earthraidingame.gif -------------------------------------------------------------------------------- /docs/img/games/hunt_the_wumpus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/hunt_the_wumpus.png -------------------------------------------------------------------------------- /docs/img/games/knightsdemonsdx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/knightsdemonsdx.png -------------------------------------------------------------------------------- /docs/img/games/talesofgruppthe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/talesofgruppthe.png -------------------------------------------------------------------------------- /docs/img/games/thespectrumclient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/thespectrumclient.png -------------------------------------------------------------------------------- /docs/img/games/uboothuntingame.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/uboothuntingame.gif -------------------------------------------------------------------------------- /docs/img/games/vampe-gotovampe.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/vampe-gotovampe.gif -------------------------------------------------------------------------------- /src/lib/arch/zxnext/stdlib/hmirror.bas: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define hMirror(x) \ 4 | Asm \ 5 | mirror a \ 6 | End Asm 7 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/31.bas: -------------------------------------------------------------------------------- 1 | DIM a as Float 2 | 3 | function test() as float 4 | LET a = a + 1 5 | end function 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/aloadstr1.bas: -------------------------------------------------------------------------------- 1 | REM simple array test 2 | 3 | DIM c as Ubyte 4 | DIM a$(100) 5 | 6 | b$ = a$(c) 7 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/array01.bas: -------------------------------------------------------------------------------- 1 | REM array assignation for Bytes 2 | 3 | DIM a(10) as UByte 4 | 5 | LET a(1) = 5 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/array04.bas: -------------------------------------------------------------------------------- 1 | REM array assignation for Bytes 2 | 3 | DIM a(10) as UInteger 4 | 5 | LET a(1) = 5 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/cast_i32tof.bas: -------------------------------------------------------------------------------- 1 | DIM CLICK AS LONG 2 | DIM TotalMinutes as Float 3 | 4 | TotalMinutes = CLICK/20 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dim_at_label2.bas: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DIM x as UInteger at @somelabel + 1 6 | 7 | somelabel: 8 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dimconst2.bas: -------------------------------------------------------------------------------- 1 | 2 | Function q 3 | DIM q as Uinteger = @Map 4 | End Function 5 | 6 | Map: 7 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dimconst2c.bas: -------------------------------------------------------------------------------- 1 | Function q 2 | DIM q as Uinteger = @Map 3 | End Function 4 | 5 | Let Map = 1 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dimconst2d.bas: -------------------------------------------------------------------------------- 1 | Function q 2 | DIM q as Uinteger = @Map 3 | End Function 4 | 5 | Dim Map = 1 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/doloopuntilsplitted.bas: -------------------------------------------------------------------------------- 1 | 2 | DO 3 | LET M=0: LOOP UNTIL i=1 4 | 5 | DO LET M=0: LOOP UNTIL i=1 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dountilsplitted.bas: -------------------------------------------------------------------------------- 1 | 2 | DO UNTIL i=1: 3 | LET M=0: LOOP 4 | 5 | DO UNTIL i=1: LET M=0: LOOP 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/dowhilesplitted.bas: -------------------------------------------------------------------------------- 1 | 2 | DO WHILE i=1: 3 | LET M=0: LOOP 4 | 5 | DO WHILE i=1: LET M=0: LOOP 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/due_inc_main.bas: -------------------------------------------------------------------------------- 1 | ' Main.bas 2 | 3 | #include "due_par.bas" 4 | 5 | Test(5) 6 | 7 | pause 0 8 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/einarshift.bas: -------------------------------------------------------------------------------- 1 | DIM a AS UBYTE = 3 2 | DIM b AS UBYTE = 2 3 | 4 | LET a = a << (3-b) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/fornextopt3.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as UByte 3 | 4 | FOR a = 1 TO 0 5 | lbl: 6 | a = a + 1 7 | NEXT a 8 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/haplo06.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as UByte 3 | DIM y as Uinteger 4 | 5 | a = a bOR peek(y) bOR peek(y + 1) 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifthencoendif.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as Byte 3 | 4 | IF a < 0 THEN: 5 | LET a = a + 1 6 | END IF 7 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifthencosntcoendif.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as UByte 3 | 4 | IF a < 0 THEN 5 | :LET a = a + 1: END IF 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifthenlblsntcoendif.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as UByte 3 | 4 | IF a < 0 THEN 5 | 10 LET a = a + 1: END IF 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifthensntcoendif.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as UByte 3 | 4 | IF a < 0 THEN 5 | LET a = a + 1: END IF 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ifwhile.bas: -------------------------------------------------------------------------------- 1 | 2 | DIM a as Byte = 0 3 | 4 | IF a < 0 THEN WHILE a < 10: a = a + 1: END WHILE 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/init_with_dot.bas: -------------------------------------------------------------------------------- 1 | 2 | ASM 3 | 4 | #init A_LABEL.DOT 5 | 6 | A_LABEL.DOT: 7 | 8 | END ASM 9 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/keyword_arg0.bas: -------------------------------------------------------------------------------- 1 | 2 | sub test(x as Ubyte = 1, y as Ubyte = 2) 3 | end sub 4 | 5 | test(213) 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/keyword_arg2.bas: -------------------------------------------------------------------------------- 1 | 2 | sub test(x as Ubyte = 1, y as Ubyte = 2) 3 | end sub 4 | 5 | test(y:=213) 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/let_array_substr12.bas: -------------------------------------------------------------------------------- 1 | DIM a$(10) 2 | LET a(3) = "0123456789" 3 | LET a(3, 5 TO 5) = "HELLO" 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/let_array_substr2.bas: -------------------------------------------------------------------------------- 1 | DIM a$(10) 2 | LET a$(3) = "0123456789" 3 | LET a$(3)(1 TO 5) = "HELLO" 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/ltee6.bas: -------------------------------------------------------------------------------- 1 | dim testglobal(5) as string 2 | dim pos as UBYTE 3 | 4 | testglobal(pos) = "global" 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/modi8b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As Byte 4 | a = a mod a mod (a mod 2 mod a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/modu8b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another MOD8 tests 3 | DIM a As UByte 4 | a = a mod a mod (a mod 2 mod a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt2_dim_arr_at1.bas: -------------------------------------------------------------------------------- 1 | DIM a(7, 5) as UInteger AT 30000 2 | DIM c as UInteger 3 | LET a(2, 2) = c 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/opt2_labelinfunc3.bas: -------------------------------------------------------------------------------- 1 | 2 | sub procedure 3 | label1: 4 | 5 | end sub 6 | 7 | POKE @label1, 5 8 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/optional_param4.bas: -------------------------------------------------------------------------------- 1 | 2 | sub test(x as String = "A") 3 | end sub 4 | 5 | test("B") 6 | test() 7 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/paramstr4.bas: -------------------------------------------------------------------------------- 1 | p(a$) 2 | 3 | sub p(q$) 4 | r(q$) 5 | end sub 6 | 7 | sub r(q$) 8 | end sub 9 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/paramstr5.bas: -------------------------------------------------------------------------------- 1 | p(a$) 2 | 3 | sub p(q$) 4 | r(q$) 5 | 6 | sub r(q$) 7 | end sub 8 | end sub 9 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/refconstparam4.bas: -------------------------------------------------------------------------------- 1 | 2 | Sub x(a as Uinteger) 3 | x(@b) 4 | End Sub 5 | 6 | Let b = 0x1234 7 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/restore2.bas: -------------------------------------------------------------------------------- 1 | REM should be ignored since there's no READ sentence 2 | DATA 10 3 | 4 | restore 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/storecstr.bas: -------------------------------------------------------------------------------- 1 | 'REM Constant string assignation test 2 | DIM f as String 3 | 4 | f = "hello" 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/strsigil.bas: -------------------------------------------------------------------------------- 1 | 'Checks undeclared strings used with string slicing 2 | e3=code(character$(i3)) 3 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/sub_data.bas: -------------------------------------------------------------------------------- 1 | Sub Test 2 | DATA "X" 'this should not be allowed 3 | End Sub 4 | 5 | Test 6 | 7 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/utf-8-bom-bas.bas: -------------------------------------------------------------------------------- 1 | datosniveles: 2 | 3 | REM this file contains an UTF-8 BOM at the beginning 4 | -------------------------------------------------------------------------------- /tests/functional/arch/zx48k/whilesplitted.bas: -------------------------------------------------------------------------------- 1 | 2 | WHILE i=1: 3 | LET M=0: WEND 4 | 5 | WHILE i=1: 6 | LET M=0: END WHILE 7 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/array01.bas: -------------------------------------------------------------------------------- 1 | REM array assignation for Bytes 2 | 3 | DIM a(10) as UByte 4 | 5 | LET a(1) = 5 6 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/divf16b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD Fixed tests 3 | DIM a As Fixed 4 | a = a / a / (a / 2 / a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/modi8b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another ADD8 tests 3 | DIM a As Byte 4 | a = a mod a mod (a mod 2 mod a) 5 | -------------------------------------------------------------------------------- /tests/functional/arch/zxnext/modu8b.bas: -------------------------------------------------------------------------------- 1 | 2 | REM another MOD8 tests 3 | DIM a As UByte 4 | a = a mod a mod (a mod 2 mod a) 5 | -------------------------------------------------------------------------------- /tests/functional/asm/asmcolon3.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/asmcolon3.bin -------------------------------------------------------------------------------- /tests/functional/asm/asmcolon4.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/asmcolon4.bin -------------------------------------------------------------------------------- /tests/functional/asm/asmlabel1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/asmlabel1.bin -------------------------------------------------------------------------------- /tests/functional/asm/asmlabel2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/asmlabel2.bin -------------------------------------------------------------------------------- /tests/functional/asm/asmproc00.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/asmproc00.bin -------------------------------------------------------------------------------- /tests/functional/asm/asmproc01.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/asmproc01.bin -------------------------------------------------------------------------------- /tests/functional/asm/asmproc02.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/asmproc02.bin -------------------------------------------------------------------------------- /tests/functional/asm/asmproc03.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/asmproc03.bin -------------------------------------------------------------------------------- /tests/functional/asm/asmproc06.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/asmproc06.bin -------------------------------------------------------------------------------- /tests/functional/asm/asmproc07.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/asmproc07.bin -------------------------------------------------------------------------------- /tests/functional/asm/constexpr.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/constexpr.bin -------------------------------------------------------------------------------- /tests/functional/asm/constexpr2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/constexpr2.bin -------------------------------------------------------------------------------- /tests/functional/asm/db256.asm: -------------------------------------------------------------------------------- 1 | ORG 32768 2 | 3 | DB 0, 1, 2, 256 4 | DB 1, TEST 5 | DS 10 6 | DS 10, 256 7 | 8 | TEST: 9 | -------------------------------------------------------------------------------- /tests/functional/asm/jphl.asm: -------------------------------------------------------------------------------- 1 | 2 | JP (HL) 3 | JP [HL] 4 | 5 | JP (IX) 6 | JP [IX] 7 | 8 | JP (IY) 9 | JP [IY] 10 | -------------------------------------------------------------------------------- /tests/functional/asm/namespace02.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/namespace02.bin -------------------------------------------------------------------------------- /tests/functional/asm/tmp_label7.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/tmp_label7.bin -------------------------------------------------------------------------------- /tests/functional/asm/zxnext_all.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/functional/asm/zxnext_all.bin -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro04.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro04.bi" 2 | 3 | #line 5 "prepro04.bi" 4 | 5 | #line 7 "prepro04.bi" 6 | 7 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro18.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro18.bi" 2 | 3 | 4 | 5 | #line 5 "prepro18.bi" 6 | 7 | PRINT (10, 20); 8 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro25.bi: -------------------------------------------------------------------------------- 1 | ' Must return 2 | ' (x + y) * 2 3 | 4 | #define test(x) x * 2 5 | 6 | test((x + y)) 7 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro26.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro26.bi" 2 | 3 | 4 | 5 | #line 5 "prepro26.bi" 6 | 7 | (x + y) + 4 * 2 8 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro34.bi: -------------------------------------------------------------------------------- 1 | ' a Single test with continued lines 2 | 3 | LET a = _ REM should be continued 4 | 5 5 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro38.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro38.bi" 2 | 3 | #line 4 "prepro38.bi" 4 | 5 | 6 | Test 7 | #line 6 8 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro59.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro59.bi" 2 | 3 | #line 3 "prepro59.bi" 4 | 5 | LET a$ = (a$ + CHR$(0)) 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro91.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro91.bi" 2 | 3 | #line 7 "prepro91.bi" 4 | OK 5 | #line 9 "prepro91.bi" 6 | -------------------------------------------------------------------------------- /tests/functional/zxbpp/prepro95.out: -------------------------------------------------------------------------------- 1 | #line 1 "prepro95.bi" 2 | 3 | #line 11 "prepro95.bi" 4 | OK 5 | #line 13 "prepro95.bi" 6 | -------------------------------------------------------------------------------- /tests/runtime/expected/eq8.tzx.scr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/runtime/expected/eq8.tzx.scr -------------------------------------------------------------------------------- /tests/runtime/expected/gei16.tzx.scr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/runtime/expected/gei16.tzx.scr -------------------------------------------------------------------------------- /tests/runtime/expected/gei8.tzx.scr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/runtime/expected/gei8.tzx.scr -------------------------------------------------------------------------------- /tests/runtime/expected/geu8.tzx.scr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/runtime/expected/geu8.tzx.scr -------------------------------------------------------------------------------- /tests/runtime/expected/gti16.tzx.scr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/runtime/expected/gti16.tzx.scr -------------------------------------------------------------------------------- /tests/runtime/expected/gti8.tzx.scr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/runtime/expected/gti8.tzx.scr -------------------------------------------------------------------------------- /tests/runtime/expected/lei16.tzx.scr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/runtime/expected/lei16.tzx.scr -------------------------------------------------------------------------------- /tests/runtime/expected/lei8.tzx.scr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/runtime/expected/lei8.tzx.scr -------------------------------------------------------------------------------- /tests/runtime/expected/lti16.tzx.scr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/runtime/expected/lti16.tzx.scr -------------------------------------------------------------------------------- /tests/runtime/expected/lti8.tzx.scr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/runtime/expected/lti8.tzx.scr -------------------------------------------------------------------------------- /tests/runtime/expected/point.tzx.scr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/runtime/expected/point.tzx.scr -------------------------------------------------------------------------------- /tests/runtime/expected/xor.tzx.scr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/tests/runtime/expected/xor.tzx.scr -------------------------------------------------------------------------------- /tests/runtime/test_all: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # run tests in parallel, one per CPU 4 | parallel ./test_case ::: cases/*.bas 5 | -------------------------------------------------------------------------------- /docs/architectures/memotech_mtx.md: -------------------------------------------------------------------------------- 1 | # Memotech MTX 2 | 3 | * http://www.mtxworld.dk/basiccmd.php 4 | * http://www.mtxinfo.de/ 5 | -------------------------------------------------------------------------------- /docs/architectures/pmd85.md: -------------------------------------------------------------------------------- 1 | # PMD85 2 | 3 | * http://pmd85.topindex.sk/ 4 | * http://reocities.com/siliconvalley/9723/other.html 5 | -------------------------------------------------------------------------------- /docs/architectures/sp2000.md: -------------------------------------------------------------------------------- 1 | # SP2000 2 | 3 | * http://velesoft.speccy.cz/sprinter-cz.htm 4 | * http://sprinter.winglion.ru/ 5 | -------------------------------------------------------------------------------- /docs/img/games/justsomethingsilly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/justsomethingsilly.png -------------------------------------------------------------------------------- /docs/img/games/questforwitchcraft.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/questforwitchcraft.gif -------------------------------------------------------------------------------- /docs/img/games/spectraldungeonsthe.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/spectraldungeonsthe.gif -------------------------------------------------------------------------------- /docs/img/games/walkingaroundporto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boriel-basic/zxbasic/HEAD/docs/img/games/walkingaroundporto.png --------------------------------------------------------------------------------