User:Johnburger/Demo/User/Data
From OSDev Wiki
< User:Johnburger | Demo
There is not much User Data required. The Executive doesn't use the Data Segment to provide each Task with its unique information (mostly Window parameters); instead it sets up registers in the Task's TSS.
The first thing that the User Task does is save away those values into its own Data Segment.
Demo/User/Data.inc
; ; User/Data.inc ; ; This module defines the Data Segment for the User Code. There will be one copy ; of this for every running program. SEGMENT User.Data START=0 ALIGN=16 NOBITS USE32 User.Data.Left RESB 1 ; Left X co-ordinate User.Data.Top RESB 1 ; Top Y co-ordinate User.Data.Width RESB 1 ; Width of area User.Data.Height RESB 1 ; Height of area User.Data.Row RESD 1 ; Delta from one row to the next