Subversion Repositories Kolibri OS

Rev

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

Rev 6647 Rev 7209
Line 1... Line 1...
1
(*
1
(*
2
    Copyright 2016 Anton Krotov
2
    Copyright 2016, 2018 Anton Krotov
Line 3... Line 3...
3
 
3
 
4
    This program is free software: you can redistribute it and/or modify
4
    This program is free software: you can redistribute it and/or modify
5
    it under the terms of the GNU Lesser General Public License as published by
5
    it under the terms of the GNU Lesser General Public License as published by
6
    the Free Software Foundation, either version 3 of the License, or
6
    the Free Software Foundation, either version 3 of the License, or
Line 185... Line 185...
185
  ptr := sysfunc4(68, 20, size, ptr);
185
  ptr := sysfunc4(68, 20, size, ptr);
186
  sys.CODE("61")  (* popa  *)
186
  sys.CODE("61")  (* popa  *)
187
  RETURN ptr
187
  RETURN ptr
188
END realloc;
188
END realloc;
Line -... Line 189...
-
 
189
 
-
 
190
PROCEDURE AppAdr(): INTEGER;
-
 
191
VAR
-
 
192
    buf: ARRAY 1024 OF CHAR;
-
 
193
    a: INTEGER;
-
 
194
BEGIN
-
 
195
    a := sysfunc3(9, sys.ADR(buf), -1);
-
 
196
    sys.GET(sys.ADR(buf) + 22, a)
-
 
197
    RETURN a
-
 
198
END AppAdr;
189
 
199
 
190
PROCEDURE GetCommandLine*(): INTEGER;
200
PROCEDURE GetCommandLine*(): INTEGER;
191
VAR param: INTEGER;
201
VAR param: INTEGER;
192
BEGIN
202
BEGIN
193
  sys.GET(28, param)
203
  sys.GET(28 + AppAdr(), param)
194
  RETURN param
204
  RETURN param
Line 195... Line 205...
195
END GetCommandLine;
205
END GetCommandLine;
196
 
206
 
197
PROCEDURE GetName*(): INTEGER;
207
PROCEDURE GetName*(): INTEGER;
198
VAR name: INTEGER;
208
VAR name: INTEGER;
199
BEGIN
209
BEGIN
200
  sys.GET(32, name)
210
  sys.GET(32 + AppAdr(), name)
Line 201... Line 211...
201
  RETURN name
211
  RETURN name
202
END GetName;
212
END GetName;