All pastes #29468 Raw Edit

Miscellany

public text v1 · immutable
#29468 ·published 2005-11-20 04:01 UTC
rendered paste body
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; name:      calc_offset
; function:  calculates offset from 0b8000h for x and y co-ordinates for an
;            80-column display
; arguments: dh - y co-ordinate
;            dl - x co-ordinate
; modifies:  eax - the new offset
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
calc_offset:
    mov   eax, 80               ; (80 *
    mul   eax, dh               ;       y) ; ERROR: invalid combo opcodes/operands
    add   eax, dl               ; ans + x  ; ERROR: ""
    shl   eax                   ; ans * 2 (hopefully) ; ERROR: ""
ret