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

Program based on Carry flag is not working , for example : program with JNC instruction #36

Open
Nilmantop opened this issue Aug 23, 2021 · 1 comment

Comments

@Nilmantop
Copy link

I prepared the following code for Transfer of data blocks in bits , but it is not working since it uses JNC instruction.

MVI B,FBH
LXI H,2030H
LXI D,2040H
LOOP:MOV A,M
STAX D
INX H
INX D
INR B
JNC LOOP
HLT

@Nilmantop Nilmantop changed the title Program based on Carry flag is not working , for example : JNC Program based on Carry flag is not working , for example : program with JNC instruction Aug 23, 2021
@Vaibhav974
Copy link

Vaibhav974 commented Feb 12, 2022

INR B doesn't affect CY Flag, use JNZ LOOP instead... (that will have same effect, as after FF Reg B loops back to 00)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants