diff --git a/abstract-machine/am/src/platform/nemu/ioe/gpu.c b/abstract-machine/am/src/platform/nemu/ioe/gpu.c index 1910c0e..59cc0be 100644 --- a/abstract-machine/am/src/platform/nemu/ioe/gpu.c +++ b/abstract-machine/am/src/platform/nemu/ioe/gpu.c @@ -31,9 +31,10 @@ void __am_gpu_config(AM_GPU_CONFIG_T *cfg) { void __am_gpu_fbdraw(AM_GPU_FBDRAW_T *ctl) { GET_W(w); + uint32_t fb_addr = FB_ADDR; for (int i = 0; i < ctl->h; i++) { for (int j = 0; j < ctl->w; j++) { - outl((uint32_t)FB_ADDR + ((ctl->y + i) * w + (ctl->x + j)), (uint32_t)ctl->pixels + (w * i + j)); + outl((uint32_t)fb_addr + ((ctl->y + i) * w + (ctl->x + j)), (uint32_t)ctl->pixels + (w * i + j)); } } if (ctl->sync) {