The Robman wrote:I had forgotten that Mike added the assembler to PB, so I was still doing it the hard way. I just tried it out and it's fabulous! Great work!
Glad you finally tried it out & liked it.

I've been a bit bogged down with work the past couple of weeks (weekends too & a few all-nighters), so I haven't had time to respond to this post before now.
The Robman wrote:Also, how about a couple of pre-defined constants for the number of fixed bytes (R10) and the number of variable bytes (R11).
Done. (See v3.11 just released.) I also added one for FLAGS (R00). The currently defined names are:
Code: Select all
Constant S3C8 S3C8+ 6805-RC16/18 6805-C9 P8/740
-------- ---- ----- ------------ ------- ------
CBYTES R11 R11 --- --- ---
DBYTES R10 R10 $66 $66 $69
DCBUF R03 R03 $5A $5A $5D
FLAGS R00 R00 $57 $57 $5A
PD00 R12 R12 $67 $67 $6A
PD01 R13 R13 $68 $68 $6B
PD02 R14 R14 $69 $69 $6C
PD03 R15 R15 $6A $6A $6D
PD04 R16 R16 $6B $6B $6E
PD05 R17 R17 $6C $6C $6F
PD06 R18 R18 $6D $6D $70
PD07 R19 R19 $6E $6E $71
PD08 R1A R1A $6F $6F $72
PD09 R1B R1B $70 $70 $73
PD0A R1C R1C $71 $71 $74
PD0B R1D R1D $72 $72 $75
PD0C R1E R1E $73 $73 $76
PD0D R1F R1F $74 $74 $77
PD0E R20 R20 $75 $75 $78
PD0F R21 R21 $76 $76 $79
PD10 R22 R22 $77 $77 $7A
PD11 R23 R23 $78 $78 $7B
PD12 R24 R24 $79 $79 $7C
PD13 R25 R25 $7A $7A $7D
PD14 R26 R26 --- --- ---
PD15 R27 R27 --- --- ---
PF0 R28 R28 $7B $7B $7E
PF1 R29 R29 $7C $7C $7F
PF2 R2A R2A $7D $7D $80
PF3 R2B R2B $7E --- $81
PF4 R2C R2C $7F --- $82
XMITIR $0133 $0146 $01AF $0183 $FF00
'---' above indicates the constant is not defined for that type of remote
The Robman wrote:Tiny suggestion, could you add # to the symbols used to identify hex, so in addition to $01 and 01H, you could enter #01.
That's a problem. All three assemblers use the leading # syntax to denote an immediate (i.e., literal) argument value. The data sheets for all three processors use this convention, and it's sort-of one of those defacto industry standards. Here's an example of the use of #:
Code: Select all
0C 0A LD RC0,#10 ;load decimal value 10 into register C0
0C 10 LD RC0,#$10 ;load hex value 10 into register C0
0C 10 LD RC0,#10h ;load hex value 10 into register C0
Without the #, the source will assemble this way:
Code: Select all
08 0A LD RC0,10 ;load value of register 0A into register C0
08 10 LD RC0,$10 ;load value of register 10 into register C0
08 10 LD RC0,10h ;load value of register 10 into register C0
... which brings up a minor problem in this file:
Your source currently assembles this way:
Code: Select all
FF18 68 04 LFF18: LD RC6,DCBUF+1 ;Save variable byte for later use
FF1A E4 FF 03 LD DCBUF,$FF ;load variable byte with all 1s
FF1D F6 01 46 CALL XMITIR ;send the prefix portion of the signal
FF20 69 03 LD DCBUF,RC6 ;restore variable byte
FF22 90 03 RL DCBUF ;rotate 1st two bits out of fixed byte
FF24 90 03 RL DCBUF
FF26 E4 A9 1C LD PD0A,$A9 ;change lead-out time to 87030 uSec
FF29 E4 FB 1D LD PD0B,$FB
FF2C 44 01 29 OR PF1,$01 ;turn on repeat flag
FF2F 8D 01 46 JP XMITIR ;jump to IR engine
I'm sure what you really meant to accomplish was this:
Code: Select all
FF18 68 04 LFF18: LD RC6,DCBUF+1 ;Save variable byte for later use
FF1A E6 03 FF LD DCBUF,#$FF ;load variable byte with all 1s
FF1D F6 01 46 CALL XMITIR ;send the prefix portion of the signal
FF20 69 03 LD DCBUF,RC6 ;restore variable byte
FF22 90 03 RL DCBUF ;rotate 1st two bits out of fixed byte
FF24 90 03 RL DCBUF
FF26 E6 1C A9 LD PD0A,#$A9 ;change lead-out time to 87030 uSec
FF29 E6 1D FB LD PD0B,#$FB
FF2C 46 29 01 OR PF1,#$01 ;turn on repeat flag
FF2F 8D 01 46 JP XMITIR ;jump to IR engine
Note the difference at FF1A, FF26, FF29 and FF2C.