English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

we have to find the number of heart beat in each minute . proff gave us the coding for finding period.we have to find number of beat per minute , i asked the proff if we can divide the period by 60 he said theoretically yes bu really hard to do assembly , so you have to use look up table ,... how? what is look up table?

2007-02-10 06:04:25 · 1 answers · asked by Princess Jasmine 2 in Computers & Internet Programming & Design

1 answers

its a table of values stored in code memory. example (off the top of my head):

MYTABLE:
DB 10h 11h 12h 13h 14h

to access the values:

MOV DPTR,#MYTABLE;get pointer to "mytable"
MOV A,01H ;A = the byte you want to retrieve (1st, 2nd, etc..)
MOVC A,@A + DPTR ;A now contains the value 11h


Note: to divide is simply:
DIV AB

just do this:
MOV PERIOD, 79H;(121 decimal)
MOV A,PERIOD
MOV B,3CH ;(60 decimal)
DIV AB; A contains 2, B contains 1 (remainder)

2007-02-11 01:47:10 · answer #1 · answered by justme 7 · 0 0

fedest.com, questions and answers