Skip to content

Commit 4d6907d

Browse files
committed
More deprecated stuff removed
1 parent 31f66f9 commit 4d6907d

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

src/asar/assembleblock.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2138,7 +2138,7 @@ void assembleblock(const char * block)
21382138
if (is("padlong")) len=3;
21392139
if (is("paddword")) len=4;
21402140
unsigned int val=getnum(par);
2141-
if(foundlabel) asar_throw_warning(1, warning_id_feature_deprecated, "labels in padbyte", "just... don't.");
2141+
if (foundlabel && !foundlabel_static) asar_throw_error(0, error_type_block, error_id_no_labels_here);
21422142
for (int i=0;i<12;i+=len)
21432143
{
21442144
unsigned int tmpval=val;
@@ -2170,7 +2170,7 @@ void assembleblock(const char * block)
21702170
if (is("filllong")) len=3;
21712171
if (is("filldword")) len=4;
21722172
unsigned int val= getnum(par);
2173-
if(foundlabel) asar_throw_warning(1, warning_id_feature_deprecated, "labels in fillbyte", "just... don't");
2173+
if (foundlabel && !foundlabel_static) asar_throw_error(0, error_type_block, error_id_no_labels_here);
21742174
for (int i=0;i<12;i+=len)
21752175
{
21762176
unsigned int tmpval=val;

tests/labels_static_fail.asm

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
;`errEno_labels_here
33
;`errElabel_cross_assignment
44
;`errEno_labels_here
5+
;`errEno_labels_here
6+
;`errEno_labels_here
57
;`errEdefine_label_math
68
;`errElabel_in_conditional
79
;`errElabel_in_conditional
@@ -47,9 +49,11 @@ incbin "data/64kb.bin":(8000)-(ANonStaticLabel+2)
4749

4850
ANewLabel = ANonStaticLabel
4951

50-
fillbyte $EE
52+
Here:
53+
fillbyte Here
5154
fill ANonStaticLabel
5255

53-
!adefine #= ANonStaticLabel
56+
padbyte Here
57+
pad ANonStaticLabel
5458

55-
; TODO: Test incbin and more.
59+
!adefine #= ANonStaticLabel

tests/labels_static_pass.asm

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
;`+
12
;`56 78
23
;`BA
34
;`BA
45
;`EE EE EE
56
;`03
67
;`42
8+
;`007FFE EE EE
79
;P>Test passed. (1)
810
;P>Test passed. (2)
911
;P>Test passed. (3)
@@ -57,9 +59,10 @@ OtherFunStuff = FunStuff
5759
db 'a'
5860
db OtherFunStuff
5961

62+
FillByte = $EE
6063
FillCount = 3
6164

62-
fillbyte $EE
65+
fillbyte FillByte
6366
fill FillCount
6467

6568
!adefine #= FillCount
@@ -74,3 +77,9 @@ endmacro
7477

7578
%in_macro($40, $41, $42)
7679

80+
81+
org $00FFFE
82+
83+
padbyte FillByte
84+
pad $018000
85+

0 commit comments

Comments
 (0)