Skip to content

Commit ca96eea

Browse files
szachy-aMiodec
andauthored
feat(lang): add 6502 assembly language (@szachy-a) (#7861)
Add 6502 assembly language I have added a new language, which is 6502 assembly code. The 6502 CPU was used in many 8-bit machines from the '80s, including Commodore 64, Atari 400/800, Apple II and so on. Taken from https://en.wikipedia.org/wiki/MOS_Technology_6502 Only using legal original 6502 instruction set (no illegal opcodes or exxtensions like 65c02) Co-authored-by: Jack <jack@monkeytype.com>
1 parent 4fd6eca commit ca96eea

3 files changed

Lines changed: 64 additions & 0 deletions

File tree

frontend/src/ts/constants/languages.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ export const LanguageGroups: Record<string, Language[]> = {
381381
"code_yoptascript",
382382
"code_cuda",
383383
"code_vhdl",
384+
"code_6502_assembly",
384385
],
385386
viossa: ["viossa", "viossa_njutro"],
386387
kokanu: ["kokanu", "likanu"],
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"name": "code_6502_assembly",
3+
"noLazyMode": true,
4+
"words": [
5+
"adc",
6+
"and",
7+
"asl",
8+
"bcc",
9+
"bcs",
10+
"beq",
11+
"bit",
12+
"bmi",
13+
"bne",
14+
"bpl",
15+
"brk",
16+
"bvc",
17+
"bvs",
18+
"clc",
19+
"cld",
20+
"cli",
21+
"clv",
22+
"cmp",
23+
"cpx",
24+
"cpy",
25+
"dec",
26+
"dex",
27+
"dey",
28+
"eor",
29+
"inc",
30+
"inx",
31+
"iny",
32+
"jmp",
33+
"jsr",
34+
"lda",
35+
"ldx",
36+
"ldy",
37+
"lsr",
38+
"nop",
39+
"ora",
40+
"pha",
41+
"php",
42+
"pla",
43+
"plp",
44+
"rol",
45+
"ror",
46+
"rti",
47+
"rts",
48+
"sbc",
49+
"sec",
50+
"sed",
51+
"sei",
52+
"sta",
53+
"stx",
54+
"sty",
55+
"tax",
56+
"tay",
57+
"tsx",
58+
"txa",
59+
"txs",
60+
"tya"
61+
]
62+
}

packages/schemas/src/languages.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ export const LanguageSchema = z.enum(
446446
"likanu",
447447
"code_vhdl",
448448
"lao",
449+
"code_6502_assembly",
449450
],
450451
{
451452
errorMap: customEnumErrorHandler("Must be a supported language"),

0 commit comments

Comments
 (0)