pedraom2007

window.asm

Oct 5th, 2021 (edited)
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [BITS 16]
  2. [ORG 0500h]
  3.  
  4.  
  5.  
  6. pusha
  7.     call DefineWindow
  8. popa
  9.     jmp ReturnKernel
  10.  
  11. %include "Hardware/wmemory.inc"
  12.  
  13. DefineWindow:
  14.     mov ah, 0Ch
  15.     mov al, 55
  16.     mov cx, 50
  17.     mov dx, 50
  18.     cmp byte[Window_Bar], 0
  19.     je WindowNoBar
  20.     jmp Rets
  21.  
  22. WindowNoBar:
  23.     mov bx, word[Window_Width]
  24.     add bx, cx
  25.     LineUp:
  26.         int 10h
  27.         inc cx
  28.         cmp cx, bx
  29.         jne LineUp
  30.         mov bx, word[Window_Height]
  31.         add bx, dx
  32.     LineRight:
  33.         int 10h
  34.         inc dx
  35.         cmp dx, bx
  36.         jne LineRight
  37.         mov bx, word[Window_Pos_X]
  38.     LineDown:
  39.         int 10h
  40.         dec cx
  41.         cmp cx, bx
  42.         jne LineDown
  43.         mov bx, word[window_Pos_Y]
  44.     LineLeft:
  45.         int 10h
  46.         dec dx
  47.         cmp dx, bx
  48.         jne LineLeft
  49. Rets:
  50.     ret
  51.  
  52.  
  53. ReturnKernel:
  54.     ret
  55.  
  56.  
Add Comment
Please, Sign In to add comment