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 791607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:51:55+00:00 2026-05-14T21:51:55+00:00

jmp start ;============================== ; Draws a horiz and vert line ;============================== startaddr dw 0a000h

  • 0
    jmp start
;==============================
;  Draws a horiz and vert line
;==============================
  startaddr dw 0a000h ;start of video memory
  colour db 1
;==============================
 start:
   mov ah,00
   mov al,19
   int 10h   ;switch to 320x200 mode
 ;=============================
 horiz:
   mov es, startaddr  ;put segment address in es ; <--- Error Line 14
   mov di, 32000  ;row 101 (320 * 100)
   add di, 75   ;column 76
   mov al,colour  ;cannot do mem-mem copy so use reg
   mov cx, 160   ;loop counter
  hplot:
    mov es:[di],al  ;set pixel to colour ; <--- Error
    inc di   ;move to next pixel
  loop hplot
 vert:
   mov di, 16000  ;row 51 (320 * 50)
   add di, 160   ;column 161
   mov cx, 100   ;loop counter
  vplot:
    mov es:[di],al  ; <--- Error
    add di, 320   ;mov down a pixel
  loop vplot
 ;=============================
 keypress:
   mov ah,00
   int 16h   ;await keypress
 end:
   mov ah,00
   mov al,03
   int 10h
   mov ah,4ch
   mov al,00   ;terminate program
   int 21h

I copied this code exactly from this tutorial.

It comes up with three errors when compiling with NASM (using no parameters, only -o output.exe):

14: Error: Invalid combination of opcode and operands
20: Error: Invalid combination of opcode and operands
28: Error: Invalid combination of opcode and operands
  • 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-05-14T21:51:55+00:00Added an answer on May 14, 2026 at 9:51 pm

    See tanascius’ answer for the problem with line 14. You need mov es, word [startaddr] here.

    Lines 20 and 28, have a common issue. Nasm requires the syntax mov [es:di],al. No size prefix is required — it’s implicit in the register operand.

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

Sidebar

Related Questions

When an assembly has an instruction like jmp f what happens to the stack
class MyString{ char buf[100]; int len; boolean append(MyString str){ int k; if(this.len + str.len>100){
I've known about the jmp instruction for awhile, but it never struck me as
Portion of a for loop ; ....... jmp SHORT $LN3@clearArray ; enter the loop
I have a assembly file and a c file compiled to .o files (start.o
As an assignment for a security class, I am trying to use __asm__(jmp 0xbffff994);
I've written a small assembly snippet (Gas, 32 bit) that takes a command-line argument,
I am using VS2008 C++ (no libs). This is my code: __asm { jmp
__asm__ ( loop:\n\t movl $1,%3\n\t movl $0, %6\n start:\n\t movl (%1,%3,4),%4\n\t movl -4(%1, %3,
I'm attempting to write a function in assembly that sets a block of memory

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.