RE: Questions on lab 3

Edwin Chan (echan@ece.ubc.ca) Sun, 29 Oct 2000 21:19:38 -0800


From: "Edwin Chan" <echan@ece.ubc.ca>
Subject: RE: Questions on lab 3
Date: Sun, 29 Oct 2000 21:19:38 -0800


----- Original Message ----- From: "Shereen Pang" <shereen@interchange.ubc.ca> To: <eece379@fs3.ece.ubc.ca> Sent: Sunday, October 29, 2000 11:51 PM Subject: Questions on lab 3 > Hi all: > > I have 3 questions on lab 3. > > 1. How do we use generics in VHDL? I realized that the example given on > page 5 of the 3rd handout (entity nregister) is not complete, ie, it > doesn't compile because I didn't give width a value in generic (width: > integer); Generics is an entity can be declared with the size underfined until the component is used. The code on page 5 is the part that declared the nregister. The code on page 6 is the part of code that USE the nregister. > 2. assembly code: how do we print an asterisk(*) on screen? how many > bytes does asterisk has? Each ASCII code represent a character. For (*), move 2AH on dl. I attached the ASCII table as pdf format in this email. > 3. Assembly code in lab 2: Why is it when we read a character from the > keyboard with MOV AH, 01H, the value of the keyboard input is stored in > AL? I assumed it's stored in AL because we subtract AL with 30H and > later move AL to DX. A series of commands is needed to obtain a character from a keyboard. MOV AH, 01H is part of the code. If you look the ASCII table, you cleanly find that the character '0' is represented by 30H. ASCII code is a STANDARD code you have to deal with. > can somebody help me out? thanks. > > Shereen Pang > > >