Skip to content

Commit

Permalink
Merge branch 'asar_19' into asar_2_beta
Browse files Browse the repository at this point in the history
  • Loading branch information
randomdude999 committed Jan 20, 2024
2 parents d921f5a + cadf808 commit 13c5e58
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/asar/assembleblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ static bool asblock_pick(char** word, int numwords)
{
recent_opcode_num = 1;

if (arch==arch_spc700 || in_spcblock) return asblock_spc700(word, numwords);
if (arch==arch_65816) return asblock_65816(word, numwords);
if (arch==arch_spc700) return asblock_spc700(word, numwords);
if (arch==arch_superfx) return asblock_superfx(word, numwords);
return true;
}
Expand Down Expand Up @@ -1680,7 +1680,6 @@ void assembleblock(const char * block, int& single_line_for_tracker)
else if(is("spcblock"))
{
//banned features when active: org, freespace(and variants), arch, mapper,namespace,pushns
if(arch != arch_spc700) asar_throw_error(0, error_type_block, error_id_spcblock_bad_arch);
if(in_struct || in_sub_struct) asar_throw_error(0, error_type_block, error_id_spcblock_inside_struct);
if(numwords < 2) asar_throw_error(0, error_type_block, error_id_spcblock_too_few_args);
if(numwords > 4) asar_throw_error(0, error_type_block, error_id_spcblock_too_many_args);
Expand Down
17 changes: 13 additions & 4 deletions tests/spcblock.asm
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
;`03 00 00 50
;`A9 AA
;`06 00 00 50
;`5F 03 50
;`8F 22 11
;`00 00 00 50
;`A9 BB

org $008000
arch spc700

lda #$AA

spcblock $5000
startpos start
startpos start
start:
jmp lab
jmp lab
lab:
mov $11,#$22
endspcblock

lda #$BB

0 comments on commit 13c5e58

Please sign in to comment.