From dc12e23b95968b89b268047adc4bd97336a8d69a Mon Sep 17 00:00:00 2001 From: marcobaye Date: Sun, 8 Jun 2014 17:59:41 +0000 Subject: [PATCH] added "contrib" directory with syntax coloring files. added two library files (cbm i/o error codes and basic error codes) git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@36 4df02467-bbd4-4a76-a152-e7ce94205b78 --- ACME_Lib/cbm/baserror.a | 50 ++++ ACME_Lib/cbm/ioerror.a | 16 + contrib/joe_syntax/INSTALL | 51 ++++ contrib/joe_syntax/acme.jsf | 297 +++++++++++++++++++ contrib/joe_syntax/color.a | 27 ++ contrib/ultraedit_wordfile/ReadMe.txt | 37 +++ contrib/ultraedit_wordfile/acme_wordfile.txt | 131 ++++++++ 7 files changed, 609 insertions(+) create mode 100644 ACME_Lib/cbm/baserror.a create mode 100644 ACME_Lib/cbm/ioerror.a create mode 100644 contrib/joe_syntax/INSTALL create mode 100644 contrib/joe_syntax/acme.jsf create mode 100644 contrib/joe_syntax/color.a create mode 100644 contrib/ultraedit_wordfile/ReadMe.txt create mode 100644 contrib/ultraedit_wordfile/acme_wordfile.txt diff --git a/ACME_Lib/cbm/baserror.a b/ACME_Lib/cbm/baserror.a new file mode 100644 index 0000000..1d8090f --- /dev/null +++ b/ACME_Lib/cbm/baserror.a @@ -0,0 +1,50 @@ +;ACME 0.95.1 + +!ifdef lib_cbm_baserror_a !eof +lib_cbm_baserror_a = 1 + +; i/o error 0 (BREAK) is mapped to basic error 30 +; codes 1 through 9 are the same for i/o and basic errors: +baserror_TOO_MANY_FILES = 1 +baserror_FILE_OPEN = 2 +baserror_FILE_NOT_OPEN = 3 +baserror_FILE_NOT_FOUND = 4 +baserror_DEVICE_NOT_PRESENT = 5 +baserror_NOT_INPUT_FILE = 6 +baserror_NOT_OUTPUT_FILE = 7 +baserror_MISSING_FILE_NAME = 8 +baserror_ILLEGAL_DEVICE_NUMBER = 9 +; from here on basic errors only: +baserror_NEXT_WITHOUT_FOR = 10 +baserror_SYNTAX = 11 +baserror_RETURN_WITHOUT_GOSUB = 12 +baserror_OUT_OF_DATA = 13 +baserror_ILLEGAL_QUANTITY = 14 +baserror_OVERFLOW = 15 +baserror_OUT_OF_MEMORY = 16 +baserror_UNDEFD_STATEMENT = 17 +baserror_BAD_SUBSCRIPT = 18 +baserror_REDIMD_ARRAY = 19 +baserror_DIVISION_BY_ZERO = 20 +baserror_ILLEGAL_DIRECT = 21 +baserror_TYPE_MISMATCH = 22 +baserror_STRING_TOO_LONG = 23 +baserror_FILE_DATA = 24 +baserror_FORMULA_TOO_COMPLEX = 25 +baserror_CANT_CONTINUE = 26 +baserror_UNDEFINED_FUNCTION = 27 +baserror_VERIFY = 28 +baserror_LOAD = 29 +baserror_BREAK = 30 +; from here on, basic 7 only: +baserror_CANT_RESUME = 31 +baserror_LOOP_NOT_FOUND = 32 +baserror_LOOP_WITHOUT_DO = 33 +baserror_DIRECT_MODE_ONLY = 34 +baserror_NO_GRAPHICS_AREA = 35 +baserror_BAD_DISK = 36 +baserror_BEND_NOT_FOUND = 37 +baserror_LINE_NUMBER_TOO_LARGE = 38 ; for RENUMBER +baserror_UNRESOLVED_REFERENCE = 39 ; for RENUMBER +baserror_UNIMPLEMENTED_COMMAND = 40 ; for OFF and QUIT +baserror_FILE_READ = 41 diff --git a/ACME_Lib/cbm/ioerror.a b/ACME_Lib/cbm/ioerror.a new file mode 100644 index 0000000..f624f65 --- /dev/null +++ b/ACME_Lib/cbm/ioerror.a @@ -0,0 +1,16 @@ +;ACME 0.95.1 + +!ifdef lib_cbm_ioerror_a !eof +lib_cbm_ioerror_a = 1 + +; if kernel i/o routine exits with carry set, A holds one of these: +ioerror_BREAK = 0 +ioerror_TOO_MANY_FILES = 1 +ioerror_FILE_OPEN = 2 +ioerror_FILE_NOT_OPEN = 3 +ioerror_FILE_NOT_FOUND = 4 +ioerror_DEVICE_NOT_PRESENT = 5 +ioerror_NOT_INPUT_FILE = 6 +ioerror_NOT_OUTPUT_FILE = 7 +ioerror_MISSING_FILE_NAME = 8 +ioerror_ILLEGAL_DEVICE_NUMBER = 9 diff --git a/contrib/joe_syntax/INSTALL b/contrib/joe_syntax/INSTALL new file mode 100644 index 0000000..7908935 --- /dev/null +++ b/contrib/joe_syntax/INSTALL @@ -0,0 +1,51 @@ +Just to make sure: +The syntax file and this help text come with ABSOLUTELY NO WARRANTY! +If you destroy your system, don't come whining to me. + + +-------------------- + systemwide install +-------------------- + +1) Copy the syntax file to the correct directory by typing: +cp acme.jsf /etc/joe/syntax/ + +2) Add the following lines to the "SECOND SECTION" of "/etc/joe/joerc": + +*.a +-indentc 9 +-istep 1 +-autoindent +-syntax acme + +3) done! + + +-------------- + user install +-------------- + +1) Copy the syntax file to the correct directory by typing: +mkdir -p ~/.joe/syntax +cp acme.jsf ~/.joe/syntax/ + +2) If you do not have a ~/.joerc file yet, create one by typing: +if [ -e ~/.joerc ] ; then echo :include /etc/joe/joerc > ~/.joerc ; fi + +3) Add the following lines to the "SECOND SECTION" of your .joerc file: + +*.a +-indentc 9 +-istep 1 +-autoindent +-syntax acme + +4) done! + + +--------- + testing +--------- + +After installing the syntax file, open the file "color.a" in joe to +check whether it works (and to see what it looks like). diff --git a/contrib/joe_syntax/acme.jsf b/contrib/joe_syntax/acme.jsf new file mode 100644 index 0000000..7bfd55a --- /dev/null +++ b/contrib/joe_syntax/acme.jsf @@ -0,0 +1,297 @@ +# JOE syntax highlight file for ACME assembly language +# new in version 3: added jml, jsl +# new in version 4: added !warn, !error, !serious +# new in version 5: changed mnemo colors +# new in version 6: added !ifndef, !addr + +# define colors +# +# bold inverse blink dim underline +# white cyan magenta blue yellow green red black +# bg_white bg_cyan bg_magenta bg_blue bg_yellow bg_green bg_red bg_black + +=Idle +=Ident +=Anon bold +=Bad bold red +=Call bold +=Comment green +=Constant cyan +=Keyword bold +=Pseudo bold +=Mnemo6502 bold yellow +=PCMnemo6502 bold red +=Mnemo6510 bg_red bold yellow +=PCMnemo6510 bg_red bold red +=Mnemo65c02 bg_cyan bold yellow +=PCMnemo65c02 bg_cyan bold red +=Mnemo65816 bg_blue bold yellow +=PCMnemo65816 bg_blue bold red + +:reset Idle + * idle noeat + " \t" reset + +:idle Idle + * idle + ";" line_comment recolor=-1 + ":{\n" reset + "!.a-zA-Z_€-" checkstring recolor=-1 buffer + "+" anonf_or_macro recolor=-1 + "-" anonb recolor=-1 + "0" got_zero recolor=-1 + "%" binary recolor=-1 + "&" octal recolor=-1 + "1-9" decimal recolor=-1 + "$" hex recolor=-1 + "'" char recolor=-1 + "\"" string recolor=-1 +# *= "*" +# ",:=()><[]*&|!~+\-%^" control recolor=-1 + +:line_comment Comment + * line_comment + "\n" reset + +:call Call + * idle noeat + "a-zA-Z0-9€-" call + +:anonf_or_macro Anon + * idle noeat + "+" anonf + ".a-zA-Z0-9€-" call recolor=-2 + +:anonf Anon + * idle noeat + "+" anonf + +:anonb Anon + * idle noeat + "-" anonb + +:got_zero Constant + * idle noeat + "xX" hex + "0-9" decimal noeat + +:binary Constant + * idle noeat + "01.#" binary + "2-9" badnum noeat + +:octal Constant + * idle noeat + "0-7" octal + "89" badnum noeat + +:hex Constant + * idle noeat + "0-9A-Fa-f" hex + +:decimal Constant + * idle noeat + "0-9" decimal + +:badnum Bad + * idle noeat + "0-9" badnum + +:string Constant + * string + "\"" idle + +:char Constant + * char + "'" idle + +:ident Idle + * idle noeat + "a-zA-Z0-9_" ident + +:checkstring Ident + * idle noeat istrings + "!8" pseudo + "!08" pseudo + "!by" pseudo + "!byte" pseudo + "!16" pseudo + "!wo" pseudo + "!word" pseudo + "!24" pseudo + "!32" pseudo + "!tx" pseudo + "!text" pseudo + "!raw" pseudo + "!pet" pseudo + "!scr" pseudo + "!scrxor" pseudo + "!ct" pseudo + "!convtab" pseudo + "!fi" pseudo + "!fill" pseudo + "!zn" pseudo + "!zone" pseudo + "!sl" pseudo + "!src" pseudo + "!source" pseudo + "!bin" pseudo + "!binary" pseudo + "!eof" pseudo + "!endoffile" pseudo + "!pseudopc" pseudo + "!align" pseudo + "!cpu" pseudo + "!to" pseudo + "!set" pseudo + "!macro" pseudo + "!if" pseudo + "!do" pseudo + "!for" pseudo + "!ifdef" pseudo + "!ifndef" pseudo + "!al" pseudo + "!as" pseudo + "!rl" pseudo + "!rs" pseudo + "!initmem" pseudo + "!warn" pseudo + "!error" pseudo + "!serious" pseudo + "!addr" pseudo + "!address" pseudo + "ora" mnemo6502 + "asl" mnemo6502 + "and" mnemo6502 + "rol" mnemo6502 + "eor" mnemo6502 + "lsr" mnemo6502 + "adc" mnemo6502 + "ror" mnemo6502 + "sta" mnemo6502 + "stx" mnemo6502 + "lda" mnemo6502 + "ldx" mnemo6502 + "cmp" mnemo6502 + "dec" mnemo6502 + "sbc" mnemo6502 + "inc" mnemo6502 + "bit" mnemo6502 + "cpx" mnemo6502 + "cpy" mnemo6502 + "ldy" mnemo6502 + "sty" mnemo6502 + "php" mnemo6502 + "clc" mnemo6502 + "plp" mnemo6502 + "sec" mnemo6502 + "pha" mnemo6502 + "cli" mnemo6502 + "pla" mnemo6502 + "sei" mnemo6502 + "dey" mnemo6502 + "txa" mnemo6502 + "tya" mnemo6502 + "txs" mnemo6502 + "tay" mnemo6502 + "tax" mnemo6502 + "clv" mnemo6502 + "tsx" mnemo6502 + "iny" mnemo6502 + "dex" mnemo6502 + "cld" mnemo6502 + "inx" mnemo6502 + "nop" mnemo6502 + "sed" mnemo6502 + "brk" pcmnemo6502 + "jmp" pcmnemo6502 + "jsr" pcmnemo6502 + "bpl" pcmnemo6502 + "bmi" pcmnemo6502 + "bvc" pcmnemo6502 + "bvs" pcmnemo6502 + "bcc" pcmnemo6502 + "bcs" pcmnemo6502 + "bne" pcmnemo6502 + "beq" pcmnemo6502 + "rti" pcmnemo6502 + "rts" pcmnemo6502 + "phy" mnemo65c02 + "ply" mnemo65c02 + "phx" mnemo65c02 + "plx" mnemo65c02 + "tsb" mnemo65c02 + "trb" mnemo65c02 + "stz" mnemo65c02 + "bra" pcmnemo65c02 + "wai" mnemo65816 + "pei" mnemo65816 + "per" mnemo65816 + "mvp" mnemo65816 + "mvn" mnemo65816 + "rep" mnemo65816 + "sep" mnemo65816 + "pea" mnemo65816 + "phd" mnemo65816 + "tcs" mnemo65816 + "pld" mnemo65816 + "tsc" mnemo65816 + "wdm" mnemo65816 + "phk" mnemo65816 + "tcd" mnemo65816 + "tdc" mnemo65816 + "phb" mnemo65816 + "txy" mnemo65816 + "plb" mnemo65816 + "tyx" mnemo65816 + "xba" mnemo65816 + "xce" mnemo65816 + "brl" pcmnemo65816 + "cop" pcmnemo65816 + "jml" pcmnemo65816 + "jsl" pcmnemo65816 + "rtl" pcmnemo65816 + "stp" pcmnemo65816 + "slo" mnemo6510 + "rla" mnemo6510 + "sre" mnemo6510 + "rra" mnemo6510 + "sax" mnemo6510 + "lax" mnemo6510 + "dcp" mnemo6510 + "isc" mnemo6510 + "anc" mnemo6510 + "asr" mnemo6510 + "arr" mnemo6510 + "sbx" mnemo6510 + "dop" mnemo6510 + "top" mnemo6510 + "lxa" mnemo6510 + "jam" pcmnemo6510 + "else" keyword + "until" keyword + "while" keyword +done + "!a-zA-Z0-9" checkstring +# " \t" idle noeat + +:pseudo Pseudo + * idle noeat +:mnemo6502 Mnemo6502 + * idle noeat +:pcmnemo6502 PCMnemo6502 + * idle noeat +:mnemo65c02 Mnemo65c02 + * idle noeat +:pcmnemo65c02 PCMnemo65c02 + * idle noeat +:mnemo65816 Mnemo65816 + * idle noeat +:pcmnemo65816 PCMnemo65816 + * idle noeat +:mnemo6510 Mnemo6510 + * idle noeat +:pcmnemo6510 PCMnemo6510 + * idle noeat +:keyword Keyword + * idle noeat diff --git a/contrib/joe_syntax/color.a b/contrib/joe_syntax/color.a new file mode 100644 index 0000000..372a134 --- /dev/null +++ b/contrib/joe_syntax/color.a @@ -0,0 +1,27 @@ +;ACME 0.91 ; comments are green +!serious "This file is not meant to be assembled." + +binary1=%00001000 ; label names are grey, constants are cyan +binary2=%....#... +octal=&0123456789 ; bad constants are bold red +decimal=63 +hex1=0xcd +hex2=$ef +!sl "labeldump.l" ; strings are cyan + *=$1300 + +dings ; macro calls are bold + else ; keyword: bold + !eof ; pseudo: bold +-- ; anonymous labels should be bold (white) + ; 6502 mnemonics + nop ; normal ones are yellow + rts ; PC-changing ones are red + ; illegals + dop ; most of them are yellow on red + jam ; this single one's red on red. Guess why. + ; 65c02 extensions + stz ; normal ones are yellow on cyan + bra ; PC-changing ones (just "BRA") are red + ; 65816 extensions + xce ; yellow on blue + cop ; PC-changing ones are red diff --git a/contrib/ultraedit_wordfile/ReadMe.txt b/contrib/ultraedit_wordfile/ReadMe.txt new file mode 100644 index 0000000..acafbad --- /dev/null +++ b/contrib/ultraedit_wordfile/ReadMe.txt @@ -0,0 +1,37 @@ + + + --- UltraEdit wordfile for ACME assembler source codes --- + + + +The word list is freeware - anyone may use it as they see fit, +commercially or otherwise. My only restriction is that I won't be held +responsible for any damages caused by using it. + +Instructions to use the wordlist: + +The contents of the wordfile should be pasted in at the end of the +file called "Wordfile.txt" in the UltraEdit program directory, and +then you should check that the number on the first line of the +assembler language definition doesn't conflict with any other language +in the wordfile. It currently reads "/L10 ..." but instead of 10 you +could put in any number between 1 and 20. 1-9 are normally already +taken, so 10 is a good choice if this is the only language you've +added to UltraEdit. +Restart UltraEdit if it was running. That's it. + +There's more information in UltraEdit's built-in +help and on this page: +http://www.ultraedit.com/index.php?name=Content&pa=showpage&pid=40#wordfiles + +The only thing which I think may seem odd to some people is that some +of the opcodes are marked red. That's the instructions that may change +the value of the program counter (JMP, JSR, RTS, BEQ etc). I think it +makes it easier to follow the program flow when reading the code. +Anyway, this can be changed so that they have the same color as the +other opcodes. It's in the "Advanced | Configuration" dialog box in +UltraEdit. + +Best regards, + +Fredrik Ramsberg diff --git a/contrib/ultraedit_wordfile/acme_wordfile.txt b/contrib/ultraedit_wordfile/acme_wordfile.txt new file mode 100644 index 0000000..c04d356 --- /dev/null +++ b/contrib/ultraedit_wordfile/acme_wordfile.txt @@ -0,0 +1,131 @@ +/L10"ACME 65xx Asm" Nocase Line Comment = ; Escape Char = \ String Chars = "' File Extensions = A ASM ASS +/Delimiters = :;#$"'()<>^-*/%+=&| , ? +/Function String = "%[a-zA-Z_][a-zA-Z0-9_]+" +/Indent Strings = "{" +/Unindent Strings = "}" +/C1"General opcodes" +, +ADC +AND +ASL +CLC COP +CLD +CLI +CLV +CMP +CPX +CPY +DEC +DEX +DEY +DCP +EOR +INC +INX +INY +ISC +LDA +LDX +LDY +LSR +LAX +MVN MVP +NOP +ORA +PHA PEA PEI PER PHB PHD PHK PLB PLD PHX PHY PLX PLY +PHP +PLA +PLP +ROL REP +ROR +RLA RRA +SBC SEP STZ S +SEC +SED +SEI +STA +STX +STY +SLO SRE SAX +TAX TCD TCS TDC TSC TXY TYX TRB TSB +TAY +TSX +TXA +TXS +TYA +WDM +X XBA XCE +Y +/C2"Program flow opcodes" +BCC BRL BRA +BCS +BEQ +BIT +BMI +BNE +BPL +BRK +BVC +BVS +JMP JML JSL +JSR +RTI RTL +RTS +STP +WAI +/C3"Pseudo opcodes" +!08 !by !byte !8 +!16 !wo !word +!24 +!32 +!fill !fi +!addr !address +!convtab !ct +!text !tx +!pet +!raw +!scr +!scrxor +!to +!source !src +!binary !bin +!sl +!zone !zn +!if +!ifdef +!ifndef +!for +!set +!do +!endoffile !eof +!macro +!initmem +!pseudopc +!align +!cpu +!al +!as +!rl +!rs +!warn !error !serious +else +/C4 "operators" +>> > >= += ++ +! != +^ +- +* +// / +% ++ +- +<< < <= +& +| +DIV +NOT +MOD +OR +XOR