8086 Assembly Language Tutorial For Beginners || Part 05 - MOV Instruction in 8086

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ม.ค. 2025

ความคิดเห็น • 39

  • @ITIndustryExposure
    @ITIndustryExposure  4 ปีที่แล้ว +15

    MOV AX, @DATA //move address of data that matters to you
    MOV DS, AX //initialize data segment
    This code initialize the Data Segment. It loads starting address of data segment into AX register. And then copy that to DS //data segment register.
    @DATA is the segment value of the data section. @DATA is fully known at the runtime.
    Why can't we directly move address of DATA into DS ??
    MOVE DS,@DATA //some assembler might support but you should not use it for convention.
    You should never use the segment registers as data registers to hold arbitrary values.
    They should only contain segment addresses.
    In addition to the general purpose registers,
    MOV instruction allow you to specify one of the segment registers as an operand.
    There are
    two restrictions on the use of the segment registers with the mov instruction.
    1.You may not specify cs as the destination operand.
    2. only one of the operands can
    be a segment register. You cannot move data from one segment register to another with a single mov instruction.
    To copy the value of cs to ds, you have to code something like this:
    mov ax, cs
    mov ds, ax
    Let me remind again ,You should never use the segment registers as data registers to hold arbitrary values.
    They should only contain segment addresses.

  • @energetictimebooster7263
    @energetictimebooster7263 ปีที่แล้ว +1

    I'm from Pakistan and enjoying *"8086 Assembly Language"* playlist......... Thank You so much....thanks You are a very good teacher

  • @haseebkhanbettani9945
    @haseebkhanbettani9945 2 หลายเดือนก่อน

    I really appreciate this kind of playlist, great job!

  • @dashengovender766
    @dashengovender766 5 ปีที่แล้ว +6

    I like your reason for not starting programming early. Simply because it's the basics and terminology that counts.

  • @princemehta8608
    @princemehta8608 6 ปีที่แล้ว +11

    Very well explanation Sir.thanks a lot for this viedo

  • @kavithak4013
    @kavithak4013 2 ปีที่แล้ว

    Wonderful teaching sir, can understand everything clearly. thank you very much

  • @clarcktumazar
    @clarcktumazar 3 ปีที่แล้ว

    Thank you for your dedication and love for your viewers

  • @kostavsheoran1530
    @kostavsheoran1530 2 ปีที่แล้ว +1

    You should sing lullabies bro , i feel sleepy after 2 mins , nice explaination though

  • @ashokyadav5554
    @ashokyadav5554 6 ปีที่แล้ว +2

    Thanks sir this video is very important for me sir

  • @anoruxylene
    @anoruxylene 5 ปีที่แล้ว +3

    Your voice sounds like very great asmr... I'm so sleepy c:

  • @akshaypathange3582
    @akshaypathange3582 5 ปีที่แล้ว +2

    wow! zero dislikes!
    Thank you sir!

  • @Skzforeverrock
    @Skzforeverrock 2 ปีที่แล้ว

    thankyou sir for your nice explanation

  • @themask5449
    @themask5449 3 ปีที่แล้ว

    Thank you for saving me ❤️

  • @gatoradefanVEVO
    @gatoradefanVEVO 4 ปีที่แล้ว +1

    you rock man thank you

  • @hessah630
    @hessah630 6 ปีที่แล้ว +2

    many thaaaaanks for you !!!!

  • @klystry1234
    @klystry1234 4 ปีที่แล้ว +2

    I Wish TH-cam could be having voice note you teach very nicely can't thank you enough I am From Tanzania 🇹🇿🇹🇿🇹🇿🇹🇿🇹🇿🇹🇿🇹🇿🇹🇿🇹🇿🇹🇿🇹🇿🇹🇿🇹🇿🇹🇿🇹🇿🇹🇿🇹🇿🇹🇿

  • @ankitsmehta07
    @ankitsmehta07 6 ปีที่แล้ว +3

    You explain beautifully sir Thanks.

  • @hdm_vision
    @hdm_vision 6 ปีที่แล้ว +2

    Great great great

  • @arbindkumar5072
    @arbindkumar5072 6 ปีที่แล้ว +2

    Thanks a lot sir

  • @naimeimran3247
    @naimeimran3247 2 ปีที่แล้ว

    Thanks

  • @sachinkumbar5089
    @sachinkumbar5089 6 ปีที่แล้ว +1

    thank you sir

  • @ramaksibati4487
    @ramaksibati4487 ปีที่แล้ว

    great explanation but MOV AX, @DATA give me 'error A2004: symbol type conflict' how to fix that ??

    • @ITIndustryExposure
      @ITIndustryExposure  ปีที่แล้ว

      The error message "A2004" typically indicates an issue in your assembly code. In the context of the x86 assembly language, MOV is used to move data between registers or memory locations. However, it appears that you are trying to use @DATA, which is not a valid operand in standard x86 assembly language.
      @DATA is not recognized as a valid operand in x86 assembly. Instead, you should use actual memory addresses or labels that have been defined in your assembly code.
      For example, if you want to move data from a memory location identified by a label, you should define the label and then use it in your MOV instruction like this:
      assembly
      Copy code
      .data ; This section defines data
      myData DW 123 ; Define a word (16-bit) variable named myData with the value 123
      .code ; This section contains code
      mov AX, [myData] ; Move the value stored at the memory location myData into the AX register
      In this example, we first define a data section with the label myData to represent a memory location with a 16-bit (word) value of 123. Then, we use [myData] to reference that memory location in the MOV instruction.
      Make sure to define your data or labels correctly within the .data or .data? section of your assembly code, and then use those labels or memory addresses in your instructions.

  • @AhamedKabeer-wn1jb
    @AhamedKabeer-wn1jb 4 ปีที่แล้ว

    Thank you sir..

  • @emmaeditex8175
    @emmaeditex8175 4 ปีที่แล้ว

    Very well explained.Sir, I have an assignment which stuck my head alot and last date of submission is 30 Jan 2021.l try alot time but not write the right program. My assignment is write program that print table of 4 in Assembly language using display memory formation method. Kindly help me! I shall be thankful to you for this act of kindness.

    • @ITIndustryExposure
      @ITIndustryExposure  4 ปีที่แล้ว +3

      .MODEL SMALL
      .STACK 100H
      .DATA
      MESSAGE DB 0AH, 0DH, "ENTER A NUMBER: $"
      NOTPROCESS DB 0AH, 0DH, "NOT A VALID DIGIT, CANNOT PROCES$"
      AGAIN DB 0AH, 0DH, "REPEAT?(Y/N): $"
      .CODE

      MAIN:
      MOV AX, @DATA
      MOV DS, AX

      LEA DX, MESSAGE
      MOV AH, 09H
      INT 21H

      MOV AH, 01H
      INT 21H

      MOV CH, 0AH
      MOV CL, 00H

      CMP AL, 3AH
      JGE NOT_PRO
      SUB AL, 30H
      MOV BH, AL
      MOV BL, 01H
      NEXT:

      MOV DL, 0DH
      MOV AH, 02H
      INT 21H

      MOV DL, 0AH
      MOV AH, 02H
      INT 21H

      MOV DL, '0'
      MOV AH, 02H
      INT 21H


      MOV DL, BH
      ADD DL, 30H
      MOV AH, 02H
      INT 21H

      MOV DL, '*'
      MOV AH, 02H
      INT 21H


      MOV AL, BL
      MUL BH

      AAM

      PUSH AX


      MOV AH, 00H
      MOV AL, BL
      AAA



      MOV CL, AH
      MOV BL, AL


      MOV DL, CL
      ADD DL, 30H
      MOV AH, 02H
      INT 21H

      MOV DL, BL
      ADD DL, 30H
      MOV AH, 02H
      INT 21H

      RESULT:
      MOV DL, '='
      MOV AH, 02H
      INT 21H

      ;-----------------------

      POP AX

      MOV DH, AL
      MOV DL, AH
      ADD DL, 30H
      MOV AH, 02H
      INT 21H

      MOV DL, DH
      ADD DL, 30H
      MOV AH, 02H
      INT 21H


      ;-----------------------

      INC BL
      DEC CH
      CMP CH, 00H
      JNE NEXT
      JMP QUESTION
      NOT_PRO:
      LEA DX, NOTPROCESS
      MOV AH, 09H
      INT 21H

      QUESTION:
      LEA DX, AGAIN
      MOV AH, 09H
      INT 21H

      MOV AH, 01H
      INT 21H

      OR AL, 20H

      CMP AL, 'y'
      JNE EXIT
      JMP MAIN
      EXIT:
      MOV AH, 04CH
      INT 21H

      END MAIN

    • @emmaeditex8175
      @emmaeditex8175 3 ปีที่แล้ว

      @@ITIndustryExposure Thanks alot sir

  • @noelsebastian2761
    @noelsebastian2761 6 ปีที่แล้ว

    For immediate mode , doesn't it have to be preceded by the '#' sign? Like MOV A, #5H

    • @surbhigoel3536
      @surbhigoel3536 5 ปีที่แล้ว +1

      @@nishanthr4968 Yes. I ran th command told by you in 8086 and it showed error.

  • @pappymilly6539
    @pappymilly6539 7 หลายเดือนก่อน

    Still watching in 2024❤✌

  • @axxsh0869
    @axxsh0869 4 ปีที่แล้ว

    bro what does MOV AX,DATA mean? Is 'DATA' immediate?

    • @ITIndustryExposure
      @ITIndustryExposure  4 ปีที่แล้ว +5

      Its move ax,@data and not move ax,data. here we are copying address of data segment to general purpose register that is AX.

  • @LordKing13
    @LordKing13 3 ปีที่แล้ว +1

    Can you be my teacher? thank you so much!!!!!!

  • @leonmarienga3293
    @leonmarienga3293 27 วันที่ผ่านมา

    Thanks

  • @SmokyBigSmoke
    @SmokyBigSmoke 5 ปีที่แล้ว +1

    thanks a lot sir