The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: t48605 on August 31, 2006, 01:45:04 AM

Title: basic question
Post by: t48605 on August 31, 2006, 01:45:04 AM
Why we can move directly a number or content of a memory to segment register ???
Title: Re: basic question
Post by: sinsi on August 31, 2006, 02:46:25 AM
You can move memory contents into a segment register (mov es,[002ch]) but you can't move an immediate value.

  mov es,1000h      <--- doesn't work

must be done

  mov ax,1000h
  mov es,ax

Title: Re: basic question
Post by: t48605 on September 03, 2006, 12:24:43 PM
well thanks !
now I want to create a random number , anyone know how to do it ???
Title: Re: basic question
Post by: ninjarider on September 03, 2006, 03:50:11 PM
you need a random number generator. theres a few posted in the forum if you look.