| ??? 04/05/03 10:58 Read: times |
#42929 - RE: arithmetic operators-assembly language Responding to: ???'s previous message |
hi prasad;
the assembler arithmatic operators are indeed for simplifying your calculation burdon as Hans has mentioned.they shall be used when you are accessing fixed locations they are a bit like #define in c. here are a few examples: a.accessing consecutive fixed address locations: base_address equ 0a000h next_address equ base_address+1 mov dptr,#base_address mov a,#01 movx @dptr,a mov dptr,#next_address movx @dptr,a is same as: base_address equ 0a000h mov dptr,#base_address mov a,#01 movx @dptr,a mov dptr,#base_address+1 movx @dptr,a b.accessing an array of structures: block_length equ 010h first_loc equ 0h second_loc equ 02h block_base equ 0a000h mov dptr,#(block_base+2*block_length+first_loc mov a,#02h movx @dptr,a above code will put a020h in place of long syntax while assembling and thus access third element in array of structures. these are particularly useful while using macros. Pranav p.s.did you write an article on linux recently? |
| Topic | Author | Date |
| arithmetic operators-assembly language | 01/01/70 00:00 | |
| RE: arithmetic operators-assembly language | 01/01/70 00:00 | |
| RE: hans & pranav | 01/01/70 00:00 | |
| RE: arithmetic operators-assembly language | 01/01/70 00:00 | |
| RE: arithmetic operators-assembly language | 01/01/70 00:00 | |
| RE: Kalpak | 01/01/70 00:00 | |
| RE: Kalpak | 01/01/70 00:00 | |
| RE: Kalpak | 01/01/70 00:00 | |
| RE: Kalpak - Andy | 01/01/70 00:00 | |
| RE: Kalpak | 01/01/70 00:00 | |
RE: arithmetic operators-assembly language | 01/01/70 00:00 |



