1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-09-08 17:54:40 +00:00

Removed semicolon after inline asm.

This commit is contained in:
jespergravgaard 2017-11-05 11:31:10 +01:00
parent 8ba5a2733f
commit f18b40d4ac
10 changed files with 308 additions and 310 deletions

View File

@ -24,7 +24,7 @@ stmt
| 'do' stmt 'while' '(' expr ')' ';' #stmtDoWhile | 'do' stmt 'while' '(' expr ')' ';' #stmtDoWhile
| 'for' '(' forDeclaration? forIteration ')' stmt #stmtFor | 'for' '(' forDeclaration? forIteration ')' stmt #stmtFor
| 'return' expr? ';' #stmtReturn | 'return' expr? ';' #stmtReturn
| 'asm' '{' asmLines '}' ';' #stmtAsm | 'asm' '{' asmLines '}' #stmtAsm
; ;
forDeclaration forDeclaration

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@ void main() {
// Clobber all registers // Clobber all registers
eor #$55 eor #$55
tax tax
}; }
SCREEN[k] = l; SCREEN[k] = l;
} }
} }

View File

@ -3,7 +3,7 @@ byte* CHARGEN = $d000;
byte* SCREEN = $0400; byte* SCREEN = $0400;
void main() { void main() {
asm { sei }; asm { sei }
byte* CHAR_A = CHARGEN+8; byte* CHAR_A = CHARGEN+8;
*PROCPORT = $32; *PROCPORT = $32;
byte* sc = SCREEN; byte* sc = SCREEN;
@ -21,5 +21,5 @@ void main() {
sc = sc+32; sc = sc+32;
} }
*PROCPORT = $37; *PROCPORT = $37;
asm { cli }; asm { cli }
} }

View File

@ -8,7 +8,7 @@ byte* CHARSET4 = $2800;
byte[] bits_count = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 }; byte[] bits_count = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 };
void main() { void main() {
asm { sei }; asm { sei }
*PROCPORT = $32; *PROCPORT = $32;
byte* chargen = CHARGEN; byte* chargen = CHARGEN;
byte* charset4 = CHARSET4; byte* charset4 = CHARSET4;
@ -32,7 +32,7 @@ void main() {
chargen = chargen+2; chargen = chargen+2;
} while (chargen<CHARGEN+$800); } while (chargen<CHARGEN+$800);
*PROCPORT = $37; *PROCPORT = $37;
asm { cli }; asm { cli }
for(byte i : 0..255) { for(byte i : 0..255) {
SCREEN[i] = i; SCREEN[i] = i;
} }

View File

@ -10,5 +10,5 @@ void main() {
sta $0700,x sta $0700,x
dex dex
bne !- bne !-
}; }
} }

View File

@ -14,7 +14,7 @@ void main() {
// Clobber all registers // Clobber all registers
eor #$55 eor #$55
tax tax
}; }
SCREEN[k] = l; SCREEN[k] = l;
} }
} }

View File

@ -3,7 +3,7 @@ byte* CHARGEN = $d000;
byte* SCREEN = $0400; byte* SCREEN = $0400;
void main() { void main() {
asm { sei }; asm { sei }
byte* CHAR_A = CHARGEN+8; byte* CHAR_A = CHARGEN+8;
*PROCPORT = $32; *PROCPORT = $32;
byte* sc = SCREEN; byte* sc = SCREEN;
@ -21,7 +21,7 @@ void main() {
sc = sc+32; sc = sc+32;
} }
*PROCPORT = $37; *PROCPORT = $37;
asm { cli }; asm { cli }
} }
Adding pre/post-modifier (byte*) main::sc ← ++ (byte*) main::sc Adding pre/post-modifier (byte*) main::sc ← ++ (byte*) main::sc

View File

@ -8,7 +8,7 @@ byte* CHARSET4 = $2800;
byte[] bits_count = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 }; byte[] bits_count = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 };
void main() { void main() {
asm { sei }; asm { sei }
*PROCPORT = $32; *PROCPORT = $32;
byte* chargen = CHARGEN; byte* chargen = CHARGEN;
byte* charset4 = CHARSET4; byte* charset4 = CHARSET4;
@ -32,7 +32,7 @@ void main() {
chargen = chargen+2; chargen = chargen+2;
} while (chargen<CHARGEN+$800); } while (chargen<CHARGEN+$800);
*PROCPORT = $37; *PROCPORT = $37;
asm { cli }; asm { cli }
for(byte i : 0..255) { for(byte i : 0..255) {
SCREEN[i] = i; SCREEN[i] = i;
} }

View File

@ -10,7 +10,7 @@ void main() {
sta $0700,x sta $0700,x
dex dex
bne !- bne !-
}; }
} }
PROGRAM PROGRAM