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'? 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. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)