Subversion Repositories SvarDOS

Rev

Rev 367 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 367 Rev 369
Line 1... Line 1...
1
 
1
 
2
#include <i86.h>
2
#include <i86.h>
3
#include <stdio.h>
-
 
4
#include <string.h>
3
#include <string.h>
5
 
4
 
6
#include "env.h"
5
#include "env.h"
-
 
6
#include "helpers.h"
7
 
7
 
8
#include "rmod.h"
8
#include "rmod.h"
9
 
9
 
10
#include "rmodinit.h"
10
#include "rmodinit.h"
11
 
11
 
Line 26... Line 26...
26
    mov envseg, ax
26
    mov envseg, ax
27
    pop bx
27
    pop bx
28
    pop ax
28
    pop ax
29
  }
29
  }
30
 
30
 
31
  printf("original (PSP) env buffer at %04X\r\n", envseg);
31
  /* printf("original (PSP) env buffer at %04X\r\n", envseg); */
32
  /* if custom envsize requested, convert it to number of paragraphs */
32
  /* if custom envsize requested, convert it to number of paragraphs */
33
  if (envsize != 0) {
33
  if (envsize != 0) {
34
    envsize += 15;
34
    envsize += 15;
35
    envsize /= 16;
35
    envsize /= 16;
36
  }
36
  }
Line 79... Line 79...
79
    pop bx       /* pop initial UMB link state from stack */
79
    pop bx       /* pop initial UMB link state from stack */
80
    int 0x21
80
    int 0x21
81
  }
81
  }
82
 
82
 
83
  if (rmodseg == 0xffff) {
83
  if (rmodseg == 0xffff) {
84
    puts("malloc error");
84
    outputnl("malloc error");
85
    return(0xffff);
85
    return(0xffff);
86
  }
86
  }
87
 
87
 
88
  /* copy rmod to its destination */
88
  /* copy rmod to its destination */
89
  myptr = MK_FP(rmodseg, 0);
89
  myptr = MK_FP(rmodseg, 0);