Geekboy

Untitled

Jan 16th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Archived:
  2.  ld a,b
  3.  Bcall(_UnarchiveVar)
  4.  pop hl
  5. MovToRamOrCreate:
  6. ; Expects variable name in Hl  MUST HAVE OBJ type in data
  7. ; Returns Data pointer to variable in HL
  8. ; Destroys all
  9.  push hl
  10.   rst 20h        ;move9toop1
  11.   ;rst 10h        ;find sym
  12.   bcall(_chkfindsym)
  13.   jr c,Create            ;IF it doesnt exist create it
  14.   inc b
  15.   djnz  Archived   ;If in ram Exit
  16.   ex de,hl    ; save data pointer
  17. MTROCQexit:   ; restore the stack from in the middle of the routine and quit
  18.  pop af
  19.  ret
  20. Create: ; Creates a variable with the data type pointed to by pop HL \ ld a,(hl)
  21.  pop hl
  22.  ld a,(hl)   ; Load A with data type
  23.  rst 20h     ; load OP1 with name
  24.  ld hl,1     ; Dont need a large space now. THO i should make the max frame size here talk to kerm
  25.              ; This needs to be changed to the bytes that indicate the size in the recieved data packet
  26.  bcall(_CreateVar) ; Make our variable
  27.  ex de,hl
  28.  ret
Advertisement
Add Comment
Please, Sign In to add comment