Post Reply 
New machine language port
12-24-2019, 10:51 PM
Post: #16
RE: New machine language port
(12-24-2019 03:00 AM)Joe Horn Wrote:  
(12-24-2019 12:30 AM)cahlucas Wrote:  ... Here is another mnemonic that causes the following error message: "Invalid Field", 'DSRB.F A'. This mnemonic is preceded by this: 'SB=0'. Does the same apply here as for the earlier 'D1=A'?

This time the invalid field is actually where it says it is. The "f" in the syntax "DSRB.f" stands for "field". Replace that "f" with whatever field you want. For example, if you want to execute DSRB on the A field, the syntax is "DSRB.A" or "DSRB A" (not "DSRB.F A").

Dear Mr. Horn,

That also worked! That is, I can compile the program. Below is another program with the errors that the assembler returned. I have already improved some mnemonics, but there are still statements that cause problems, see below. Hopefully you can help me with this too. Merry Christmas! Sincerely, Karel.


::
CODE
GOSBVL =SAVPTR
SETHEX
P= 0
A=DAT1 A
AD1EX
D1=D1+ 5
C=DAT1 A
R0=C W
D1=A
D1=D1+ 5
A=DAT1 A
AD1EX
D1=D1+ 10
CD1EX
R3=C W
D1=A
D1=D1+ 5
C=DAT1 A
CD0EX
D0=D0+ 5
C=DAT0 A
R2=C W
D1=D1+ 5
C=DAT1 A
CD0EX
D0=D0+ 5
C=DAT0 A
C=C-CON A,5 <----- Bad Expression!
R1=C W
B=C A
D0=D0+ 5
CD0EX
C=C+B A
C=C-1 A
C=C-1 A
R4=C W
C=R3 W
D0=C
B=0 A
*LBCF90 A=DAT0 B
A=A+1 B
GOC LBCFC1
D0=D0+ 2
A=DAT0 S
A=A+1 S
GONC LBCFAF
A=R1 W
B=B+A A
B=B+1 A
B=B+1 A
*LBCFAF D0=D0+ 16
CD0EX
A=R2 W
C=C+A A
D0=C
GOTO LBCF90
*LBCFC1 C=B A
C=C+CON A,16 <----- Invalid Field!
GOSBVL =GETTEMP
AD0EX
D0=A
C=C-CON A,5 <----- Bad Expression!
D0=D0+ 5
DAT0=C A
D0=A
LC(5) =DOCSTR <----- Bad Expression!
DAT0=C A
GOSBVL =GPPushA
GOSBVL =SAVPTR
A=A+CON A,10 <----- Invalid Field!
D1=A
LC(2) #2B <----- Bad Expression!
DAT1=C B
D1=D1+ 2
C=R3 W
D0=C
ST=0 2
*LBD019 A=DAT0 B
A=A+1 B
GONC LBD046
?ST=1 2
GOYES LBD035
LC(2) #30
DAT1=C B
D1=D1+ 2
GOTO LBD038
*LBD035 D1=D1- 2
*LBD038 LC(2) #20
DAT1=C B
GOVLNG =GETPTRLOOP
*LBD046 D0=D0+ 2
A=DAT0 S
A=A+1 S
GOC LBD065
*LBD053 D0=D0+ 16
CD0EX
A=R2 W
C=C+A A
D0=C
GOTO LBD019
*LBD065 D0=D0+ 1
A=DAT0 A
C=R0 W
A=A+C A
?A#0 A
GOYES LBD07E
D0=D0- 1
GOTO LBD053
*LBD07E D0=D0+ 5
A=DAT0 A
C=A A
D=C A
D0=D0+ 5
C=DAT0 A
A=-A-1 A
B=A A
A=A!C A
B=B&C A
B=-B-1 A
A=A&B A
D0=D0+ 5
CD0EX
RSTK=C
C=R4 W
D0=C
C=R1 W
B=C A
BSRB A
ST=1 1
*LBD0BB ?B#0 A
GOYES LBD0EB
?ST=0 1
GOYES LBD0CF
LC(2) #31
DAT1=C B
D1=D1+ 2
*LBD0CF GOSUB LBD12F
LC(2) #2B <----- Bad Expression!
DAT1=C B
D1=D1+ 2
C=RSTK
A=R2 W
C=C+A A
D0=C
GOTO LBD019
*LBD0EB SB=0
DSRB A
?SB=0
GOYES LBD104
C=DAT0 B
ASRB A
GOTO LBD11D
*LBD104 ASRB A
?SB=0
GOYES LBD126
C=DAT0 B
C=C+CON A,16 <----- Invalid Field!
C=C+CON A,16 <----- Invalid Field!
*LBD11D DAT1=C B
D1=D1+ 2
ST=0 1
*LBD126 D0=D0- 2
B=B-1 A
GOTO LBD0BB
*LBD12F CD1EX
RSTK=C
C=C-CON A,2 <----- Bad Expression!
D0=C
D1=C
LC(2) #2B <----- Bad Expression!
*LBD144 A=DAT0 B
?C=A B
GOYES LBD153
D0=D0- 2
GOTO LBD144
*LBD153 D0=D0+ 2
*LBD156 AD0EX
D0=A
CD1EX
D1=C
?C<=A A
GOYES LBD17D
A=DAT0 B
C=DAT1 B
DAT0=C B
DAT1=A B
D0=D0+ 2
D1=D1- 2
GOTO LBD156
*LBD17D C=RSTK
D1=C
ST=1 2
RTN
ENDCODE
DUP
$ " "
ONE
POS$
#1-
TWO
SWAP
SUB$
;
@

I use HP-16C, WP-34S emulator, HP-35s, HP-48GX, HP-50g, and HP Prime G2.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
New machine language port - cahlucas - 12-21-2019, 01:17 AM
RE: New machine language port - Joe Horn - 12-21-2019, 03:22 AM
RE: New machine language port - cahlucas - 12-22-2019, 03:14 AM
RE: New machine language port - Joe Horn - 12-22-2019, 05:25 AM
RE: New machine language port - cahlucas - 12-22-2019, 09:15 PM
RE: New machine language port - rprosperi - 12-22-2019, 11:31 PM
RE: New machine language port - Joe Horn - 12-23-2019, 12:12 AM
RE: New machine language port - rprosperi - 12-23-2019, 02:56 AM
RE: New machine language port - Joe Horn - 12-23-2019, 07:35 AM
RE: New machine language port - cahlucas - 12-24-2019, 12:30 AM
RE: New machine language port - Joe Horn - 12-24-2019, 03:00 AM
RE: New machine language port - cahlucas - 12-24-2019 10:51 PM
RE: New machine language port - Joe Horn - 12-24-2019, 11:15 PM
RE: New machine language port - cahlucas - 12-27-2019, 12:19 AM
RE: New machine language port - Joe Horn - 12-27-2019, 06:43 AM
RE: New machine language port - Gene - 12-24-2019, 02:31 AM
RE: New machine language port - cahlucas - 12-24-2019, 04:52 PM
RE: New machine language port - Joe Horn - 12-24-2019, 06:10 PM
RE: New machine language port - cahlucas - 12-24-2019, 11:30 PM
RE: New machine language port - cahlucas - 12-24-2019, 11:25 PM
RE: New machine language port - cahlucas - 12-27-2019, 09:22 PM
RE: New machine language port - Joe Horn - 12-27-2019, 11:20 PM
RE: New machine language port - cahlucas - 12-28-2019, 02:47 AM
RE: New machine language port - Joe Horn - 12-28-2019, 03:25 AM
RE: New machine language port - DavidM - 12-28-2019, 03:31 PM
RE: New machine language port - cahlucas - 12-29-2019, 04:26 AM
RE: New machine language port - cahlucas - 12-29-2019, 04:23 AM
RE: New machine language port - Joe Horn - 12-29-2019, 06:48 AM
RE: New machine language port - cahlucas - 12-29-2019, 09:17 PM
RE: New machine language port - ijabbott - 12-29-2019, 06:46 AM
RE: New machine language port - cahlucas - 12-29-2019, 09:10 PM
RE: New machine language port - cahlucas - 12-29-2019, 09:01 PM
RE: New machine language port - cahlucas - 12-29-2019, 09:19 PM



User(s) browsing this thread: 1 Guest(s)