# HG changeset patch # User William Astle # Date 1436938578 21600 # Node ID db58cdca8a7f52b0f234866805b12ddbcdefbd7f # Parent 229d216a4c116cf9a6b11fa1db771bd4821dd643 Fix idiocy related to pshu/pulu with "u" as an operand Historically, lwasm and some other assemblers silently accept "u" as a register to pshu/pulu. The problem is that it is impossible to encode in the object code since the bit pattern for U and S are identical and is treated as U for PSHS/PULS and S for PSHU/PULU. Replace all instances of "U" in PSHU/PULU with "S". This is necessary due to upcoming tightening of code validation in lwasm, and also makes it properly clear what is really happening for people who aren't intimately familiar with the intricacies of the 6809. diff -r 229d216a4c11 -r db58cdca8a7f 3rdparty/packages/sierra/objs_lsl/mnln.asm --- a/3rdparty/packages/sierra/objs_lsl/mnln.asm Mon Mar 23 21:40:21 2015 +0100 +++ b/3rdparty/packages/sierra/objs_lsl/mnln.asm Tue Jul 14 23:36:18 2015 -0600 @@ -8613,10 +8613,10 @@ L5130 leau >L5130,pcr ldd ,s - pshu u,b,a + pshu s,b,a rts L5139 leau >L512C,pcr - pulu u,b,a + pulu s,b,a std ,s rts diff -r 229d216a4c11 -r db58cdca8a7f level1/cmds/edit.asm --- a/level1/cmds/edit.asm Mon Mar 23 21:40:21 2015 +0100 +++ b/level1/cmds/edit.asm Tue Jul 14 23:36:18 2015 -0600 @@ -475,7 +475,7 @@ pshs u leax L13C6,pcr lbsr L00EF @@ -1085,7 +1085,7 @@ bcs L0880 L0893 lbsr L00FF lbsr L0929 - pulu pc,u + pulu pc,s L089B pshs b,a ldd ,x leax d,x @@ -1119,7 +1119,7 @@ pshs x subd ,s++ std L1318,pcr lbsr L00EF lbsr L0929 -L0A29 pulu pc,u +L0A29 pulu pc,s L0A2B pshs y,x,b,a lbsr L0660 andcc #^Carry @@ -1354,7 +1354,7 @@ puls x,b,a lbsr L0668 bne L0AD2 -L0AFF pulu pc,u +L0AFF pulu pc,s L0B01 pshs y cmpd #$0000 beq L0B26 @@ -1395,7 +1395,7 @@ tfr y,d puls x lbsr L0BE3 -L0B5C pulu pc,u +L0B5C pulu pc,s lbsr L0660 beq L0B94 ldx