Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

アドレスPUSH後, RETによりその番地に飛ぶことができない #6

Open
soundscope opened this issue Nov 24, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@soundscope
Copy link

アドレスPUSH後, RETによりその番地に飛ぶことができない
caslの仕様通りなら飛べるはず
一例として以下のコードが動作しない

CASL  START 
BEGIN  NOP
  PUSH O
  RET
  NOP
O NOP
  OUT C,E
  RET
E DC 2
C DC 'OK'
 END

他の多くのシミュレータでは, 正常に動作していたのでバグ扱い.

バグ発見の経緯
CALL: SP <- (SP) - 1, (SP) <- (PR), PR <- 実行アドレス
POP: r <- ((SP)), SP <- (SP) + 1
を以下の二命令
PUSH: SP <- (SP) - 1, (SP) <- 実行アドレス
RET: PR <- ((SP)), (SP) <- (SP) + 1
で置き換えたところ正常に動作しなかった.

@kusumoto-lab kusumoto-lab added the bug Something isn't working label Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants