A86: Scrolling


[Prev][Next][Index][Thread]

A86: Scrolling




Hello Everyone,
    I am messing around with scrolling routines... I am trying to port the
82 ones that Crash_Man made.. this is the scrollup routine, if someone could
please tell me what is wrong with it, i might be able to work on the
down/left/right ones.. notice that this shouldn't crash.. just doesn't work
right...
;----------------------
#include "asm86.h"
#include "ti86asm.inc"
.org _asm_exec_ram
    call MakeScreen
    call _getkey
    ld b,64
UpLoop:
    call ScrollUp
    djnz UpLoop
    call _getkey
    ret



ScrollUp:                       ; [16228 Clock Cycles]
  push bc
  push hl
  push af
  LD  HL, $FC00+16              ; Copy from one row below top  [was
GRAPH_MEM+12]
  LD  DE, $FC00                 ;   to top row  [was GRAPH_MEM]
  LD  BC, 1024                  ;   756 bytes [was 756]
  LDIR
  LD  H, D                      ; Fill Blanks
  LD  L, E
  INC E
  LD  (HL), B
  LD  C, 15                     ;was 11
  LDIR
  pop bc
  pop hl
  pop af
  RET

;<THIS IS TAKEN FROM KOLLUMS TO TEST THE SCROLLING>
MakeScreen:
    call _clrLCD
    ld a,%01010101           ;this is the bitmap for the top seven lines of
the intro
    ld b,7                   ;we have seven lines
    ld hl,$FC00              ;this is the first spot we want to write to
Graphxloop:
    push bc                  ;save the counter of lines
    ld b,16                  ;make a new counter of bytes in the line (16)
Graphxloop2:
    ld (hl),a                ;put the bitmap in
    inc hl                   ;increment to the next byte on screen
    djnz Graphxloop2         ;and jump back until line is finished
    cpl                      ;this is equal to <xor 255>, to change the
bitmap
    pop bc                   ;get the old counter back
    djnz Graphxloop          ;and keep going until all seven lines done
    ret

.end
END
;-----------------

Thanks.  Please notice that my email addy is now ahmedre@bellsouth.net.  My
website should be up soon.. when i get some time.. and I will fix calendar
when i get time.. I hope!
                                                                            
                                        -Ahmed