With VMLAB, write a code file that starts by putting ten numbers, the values +11.0 to +20.0, into the EEPROM using direc

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

With VMLAB, write a code file that starts by putting ten numbers, the values +11.0 to +20.0, into the EEPROM using direc

Post by answerhappygod »

With VMLAB, write a code file that starts by putting ten
numbers, the values +11.0 to +20.0, into the EEPROM using
directives. Each number should be in IEEE 754 format with the bytes
arranged big-endian. Then a loop should replace each value with the
value plus +1.0. For example, the bytes for +11.0 will change to
the bytes for +12.0.
Include screenshots from VMLAB that demonstrate your
code. Here is code to get you started:
.include "C:\VMLAB\include\m168def.inc"
.eseg
.dw 0x3f80
.cseg
ldi r16, 0x00
out eearh, r16
ldi r16, 0x04
out eearl, r16
sbi eecr, eere
wait1: sbic eecr, eere
rjmp wait1
subi r16, 4
out eearl, r16
sbi eecr, eempe
sbi eecr, eepe
wait2: sbic eecr, eepe
rjmp wait2
subi r16, -5
out eearl, r16
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply