1

Good evening i am a new programmer ,trying to compile the below code at assembly using pdp-11 simulator. But im stack with errors,i'm sure about the syntax but can't define where the error or what to change. the code :

movb @#tkb, r0
bic #177600, r0
cmpb #’$, r0
beq seton

error descripe: "error 8-illegal character" for the line "cmpb #'$, r0".

anyone knows why that is? and how should i write it? The point is to stop the loop when i get the '$ char.

lurker
  • 56,987
  • 9
  • 69
  • 103
doronbs11
  • 15
  • 1
  • 4
  • 1
    Did you copy/paste that code from a PDF file or web page? Your `#’$` looks like it might not be using a proper ASCII single quote. Just a hunch. It should be `#'$`. Try retyping that line manually. – lurker Jun 20 '18 at 19:24
  • @lurker is correct: I ran `hexdump -C` in a terminal window and pasted the code from your question: `23 e2 80 99 24`, i.e. `#...$` so it's a 3-byte utf-8 character. – Peter Cordes Jun 20 '18 at 19:33
  • I found a duplicate by searching on `code:"’"` on SO (copy-pasting your non-ASCII character) – Peter Cordes Jun 20 '18 at 19:42

0 Answers0