Re: the IN instruction

Kim Bozman (kbozman379@hotmail.com) Sun, 20 Feb 2000 17:05:31 PST


From: "Kim Bozman" <kbozman379@hotmail.com>
Subject: Re: the IN instruction
Date: Sun, 20 Feb 2000 17:05:31 PST

Hi Andrew, The following is taken out of the Intel instruction set. You to it off the elec379 web page: IN - transfers a byte or word from an input port to the AL register or the AX register, respectively. Therefore, when you say "IN AL,DX" you will only intake a byte. If you change the line to "IN AX,DX" you will intake the word. I don't think you can replace the IN command since it uses port numbers and "MOV AL,[BX]" will use the address 224H instead of port 224H. Hope this helps, Kim >From: "Andrew Yung" <ayung@physics.ubc.ca> >To: <eece379@casas2.ece.ubc.ca> >Subject: the IN instruction >Date: Sun, 20 Feb 2000 16:21:28 -0800 > >I have the following piece of code: > >MOV DX,224H >IN AL,DX > >Will the IN instruction try to load al with the _word_ in DX or the _byte_? > >Could I just replace this code with: > >MOV BX,224H >MOV AL,[BX] > >to achieve the same result, or is there something special about the IN >instruction? > >Thanks! > ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com