Subversion Repositories aysalia

Rev

Rev 10 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10 Rev 14
1
 
1
 
2
; Aysalia DOS Launcher
2
; Aysalia DOS Launcher
3
; DOS Stub for AyDos.exe fat binary
3
; DOS Stub for AyDos.exe fat binary
4
; Revision 2018-12-01
4
; Revision 2018-12-05
5
; (C) 2018 Daniel Marschall, ViaThinkSoft
5
; (C) 2018 Daniel Marschall, ViaThinkSoft
6
 
6
 
7
.model tiny
7
.model tiny
8
.code
8
.code
9
org 100h
9
org 100h
10
 
10
 
11
start:
11
start:
12
 
12
 
13
jmp real_start
13
jmp real_start
14
 
14
 
15
    exename1  db "AYDOS.MNU",0
15
    exename1  db "AYDOS.MNU",0
16
    cmdargs   db 0,'',0dh
16
    cmdargs   db 0,'',0dh
17
 
17
 
18
    dummy_fcb db 36 dup(0)
18
    dummy_fcb db 36 dup(0)
19
 
19
 
20
    paramblk  dw 0          ; use environment of parent
20
    paramblk  dw 0          ; use environment of parent
21
              dw cmdargs    ; command line arguments
21
              dw cmdargs    ; command line arguments
22
              dw 0          ; cmdargs_seg
22
              dw 0          ; cmdargs_seg
23
              dw dummy_fcb  ; fcb1
23
              dw dummy_fcb  ; fcb1
24
              dw 0          ; fcb1_seg
24
              dw 0          ; fcb1_seg
25
              dw dummy_fcb  ; fcb2
25
              dw dummy_fcb  ; fcb2
26
              dw 0          ; fcb2_seg
26
              dw 0          ; fcb2_seg
27
 
27
 
28
 
28
 
29
real_start:
29
real_start:
30
    ; Reduce size of own application to give the called applications more space
30
    ; Reduce size of own application to give the called applications more space
31
    ; TODO: Is that required for a COM file?
-
 
32
    mov     ah, 4ah
31
    mov     ah, 4ah
33
    mov     al, 00h    
-
 
34
    mov     bx, 50        ; 50 paragraphs a 16 byte = 800 byte
32
    mov     bx, 32    ; 32 paragraphs a 16 bytes = 512 bytes
35
    int     21h
33
    int     21h
36
 
34
 
37
    ; Start Menu
35
    ; Start Menu
38
    mov     ah, 4bh   ; execute 
36
    mov     ah, 4bh   ; execute 
39
    mov     al, 00h   ; load and execute 
37
    mov     al, 00h   ; load and execute 
40
    mov     bx, paramblk
38
    mov     bx, paramblk
41
    lea     dx, exename1
39
    lea     dx, exename1
42
    int     21h
40
    int     21h
43
 
41
 
44
    ; Return to DOS
42
    ; Return to DOS
45
    mov     ah, 4ch
43
    mov     ah, 4ch
46
    mov     al, 00h
44
    mov     al, 00h
47
    int     21h
45
    int     21h
48
 
46
 
49
end start
47
end start
50
 
48