Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7779573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:40:23+00:00 2026-06-01T18:40:23+00:00

I have the following asm code (x86). .input: mov ah, 00h ; get key

  • 0

I have the following asm code (x86).

.input:
mov ah, 00h         ; get key from keyboard buffer
int 16h         ; interrupt 16h 
mov dl, al      ; move ASCII code into dl
mov ah, 02h     ; function 02
int 21h         ; interrupt 21h
mov ah, 0Eh     ; tell the BIOS to print the character in the AL register
mov al, dl      ; copy dl into al
int 10h         ; print al
sub al,0Dh      ; check if it's carriage return
jz 01h          ; jump relative 1 (to skip newLine)
call newLine        ; add CR LF
jmp .input      ; loop

However, the jump if zero instruction is not working as expected (hoped) i.e. jz 01h.

I would like to jump relative 1 instruction (or add one to the IP), to jump over the call newLine subroutine.

Currently when I press the enter key and the jz instruction is called, I believe the program is jumping absolute as a piece of code early on in the program is run.

Any ideas?

Thanks, Steve

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T18:40:23+00:00Added an answer on June 1, 2026 at 6:40 pm

    Jump 01h will not actually skip past the call, because it counts bytes, not instructions. The call instruction consists of multiple bytes. Why not add another label after the call that you can jump to, like jz .afterCall?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say we have the following c++ code: int var1; __asm { mov var1,
I have inserted the following asm code in my C++ code. I am using
I have following asm MIPS code: 80031DB8 bnez $v0, loc_80031F58 80031DBC move $v0, $zero
In ASM i have the following code which encrypts a character. Inputs: EAX =
I have following SQL code: SELECT m.email FROM members as m WHERE exists (
In my ASP.NET MVC application, I have the following setup: <runtime> <assemblyBinding xmlns=urn:schemas-microsoft-com:asm.v1> <probing
I have following table structure: Table: Plant PlantID: Primary Key PlantName: String Table: Party
I Have following code: Controller: public ActionResult Step1() { return View(); } [AcceptVerbs(HttpVerbs.Post)] public
I have following Code Block Which I tried to optimize in the Optimized section
If I have the following code in Windows VC++: DWORD somevar = 0x12345678; _asm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.