1 / 1

Memory Variables

Memory Variables. *file: memtest.asm *This program illustrates how to latch input from switches, XOR * and how to store a value in memory. Illustrates 3 different * methods to access memory. D port for input, A port for output *For the 68HC11 MicroStamp11, Dr. Hoganson, 12/04/02

odelia
Download Presentation

Memory Variables

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Memory Variables *file: memtest.asm *This program illustrates how to latch input from switches, XOR * and how to store a value in memory. Illustrates 3 different * methods to access memory. D port for input, A port for output *For the 68HC11 MicroStamp11, Dr. Hoganson, 12/04/02 ********************** definitions ***************************** rbase equ $0000 ;beginning of register/memory port_a equ rbase+0 ;port A is the first register port_d equ rbase+8 ;port D is the input port * note that port_d 0 is RXD, 1 is TXD, so can't use h_sec equ $ffff ;delay loop value (about 1/2 second) memtest equ rbase+100 ;location to store variable memtest *********************data section******************************* org 0100 mem2 rmb 1 ;note that memtest and mem2 are * ; at the same location in memory. Creates 1 byte. mem3 fcb $00 ;located at 0101, contents 00 *********************code section******************************* org $e000 ;beginning of EEPROM (68HC811E2) begin: ldaa #$04 ;value to disable timed interrupt staa $3f ;disables an timed interrupt lds #$ff ;set stack start ldaa #$00 ;clear staa port_a loop: ldab port_d ;pins 20 and 19 in use stab mem3 ;substitute mem2 or memtest • Three methods: • Equate label to a location • Declare/reserve memory using rmb or fcb

More Related