Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
S
sbpmixer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
DOSx86
sbpmixer
Commits
d38fa51a
Commit
d38fa51a
authored
2 years ago
by
shidel
Browse files
Options
Downloads
Patches
Plain Diff
porting to NASM
parent
0385f107
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
SOURCE/SBPMIXER/MACROS.ASM
+13
-10
13 additions, 10 deletions
SOURCE/SBPMIXER/MACROS.ASM
SOURCE/SBPMIXER/MIXER.ASM
+140
-7
140 additions, 7 deletions
SOURCE/SBPMIXER/MIXER.ASM
SOURCE/SBPMIXER/PROCS.ASM
+3
-2
3 additions, 2 deletions
SOURCE/SBPMIXER/PROCS.ASM
with
156 additions
and
19 deletions
SOURCE/SBPMIXER/MACROS.ASM
+
13
−
10
View file @
d38fa51a
...
...
@@ -132,10 +132,10 @@
%endmacro
%imacro MIXER_SetFMChannel 1
; Channel : byte =
; 0 : No Steering
;
; 1 : S
T
to Left
;
; 2 : S
T
to Right
;
; 3 : MUTE
}
; 0 : No Steering
; 1 : S
teer
to Left
; 2 : S
teer
to Right
; 3 : MUTE
xor
bh
,
bh
mov
bl
,
%
1
mov
ax
,
0x09
...
...
@@ -358,10 +358,10 @@
%ifndef StdOutStr_Required
%define StdOutStr_Required
%endif
push
d
i
DefReg
%
1
,
d
i
push
s
i
DefReg
%
1
,
s
i
call
StdOutStr_Proc
pop
d
i
pop
s
i
%endmacro
%imacro StdOutChar 1
...
...
@@ -420,7 +420,8 @@
%imacro GetEnvStr 1
; %1 is Offset of Search String, returns DS:SI points to data
; if not found then carry flag is set
; if not found then carry flag is set and DS:SI points to null at the end of
; the environment table.
%ifndef GetEnvStr_Required
%define GetEnvStr_Required
%endif
...
...
@@ -434,6 +435,7 @@
%imacro ParseStr 2
; CS:%1 Pointer to sub-string handler
; DS:%2 Pointer to string to processes
; CF is set if error occurred
%ifndef ParseStr_Required
%define ParseStr_Required
%endif
...
...
@@ -476,7 +478,7 @@
%imacro LenStrToWord 2
; %1 Length of String
; DS:%2 Pointer to string to convert
; Return AX = value, CF if
E
rror
; Return AX = value, CF if
e
rror
%ifndef LenStrToWord_Required
%define LenStrToWord_Required
%define LenStrToWordHex_Required
...
...
@@ -488,7 +490,8 @@
%endmacro
%imacro LenStrHexToWord 2
; Just like LenStrToWord except always treated as hex
; Just like LenStrToWord except always treated as hex value,
; string should never include a 0x prefix.
%ifndef LenStrHexToWord_Required
%define LenStrHexToWord_Required
%define LenStrToWordHex_Required
...
...
This diff is collapsed.
Click to expand it.
SOURCE/SBPMIXER/MIXER.ASM
+
140
−
7
View file @
d38fa51a
...
...
@@ -24,17 +24,80 @@ org 0x100
StdOutCRLF
push
ds
GetEnvStr
String_Blaster
GetEnvStr
String_Blaster
; if VAR not found, points to NULL and CF
ParseStr
Opts_Blaster
,
si
pop
ds
ParseStr
Opts_CommandLn
,
PSP_CMDLN
StdOutCRLF
MIXER_GetBasePort
StdOutStr
Text_BasePort
StdOutHexWord
ax
StatusDisplay:
mov
si
,
StatusTypes
cld
.Display:
mov
cx
,
0x0d
lodsb
test
al
,
al
jz
.Done
.PrintStr:
dec
cx
StdOut
al
lodsb
test
al
,
al
jnz
.PrintStr
StdOut
0x3a
mov
dl
,
0x20
cmp
cx
,
0x10
ja
.NoPadding
.PrintPadding:
int
0x21
loop
.PrintPadding
.NoPadding:
lodsw
push
ax
lodsb
xor
ah
,
ah
MIXER_CALL
SBPMixer
pop
di
; was pushed as ax
cmp
di
,
0x0002
ja
.ResultLookup
cmp
di
,
0x0001
jb
.ResultHexWord
ja
.ResultMono
push
ax
StdOut
'L'
pop
ax
push
ax
StdOutIntByte
al
pop
ax
push
ax
StdOut
' '
,
'/'
,
' '
,
'R'
pop
ax
push
ax
StdOutIntByte
al
pop
ax
jmp
.ResultDone
.ResultMono:
StdOutIntByte
al
jmp
.ResultDone
.ResultHexWord:
push
ax
StdOut
'0'
,
'x'
pop
ax
StdOutHexWord
ax
jmp
.ResultDone
.ResultLookup:
StdOut
'?'
.ResultDone:
StdOutCRLF
jmp
.Display
.Done:
; MIXER_GetBasePort
; StdOutStr Text_BasePort
; StdOutHexWord ax
; StdOutCRLF
Terminate
0
...
...
@@ -65,7 +128,7 @@ Opts_Blaster:
%include 'PROCS.ASM'
String_Blaster:
db
'BLASTER
Z
'
,
0
db
'BLASTER'
,
0
Text_Title:
db
'
Sound
Bl
aster
Pro
Mixer
Ch
ip
Interface
',13,10,0
...
...
@@ -73,6 +136,76 @@ Text_Copyright:
db '
Copyright
(
c
)
1993
-
2022
Jerome
Shidel
'
,
13
,
10
,
0
Text_Version:
db
'
Version
',0
Text_BasePort:
db '
Base
Port
0
x
'
,
0
Text_Volume:
db '
Volume
',0
StatusTypes:
db '
Base
Port
',0
dw 0
db 0x01
db '
Master
',0
dw 1
db 0x10
db '
Voice
',0
dw 1
db 0x11
db '
Line
',0
dw 1
db 0x17
db '
FM
',0
dw 1
db 0x12
db '
CD
',0
dw 2
db 0x13
db '
MIC
',0
dw 2
db 0x14
db '
FM
Steering
',0
dw StatusSteerFM
db 0x15
db '
FM
Mode
',0
dw StatusModeFM
db 0x16
db '
ADC
Ch
annel
',0
dw StatusADC
db 0x18
db '
ADC
Filter
',0
dw StatusFilter
db 0x19
db '
ANFI
Filter
',0
dw StatusBool
db 0x1A
db '
DNFI
Filter
',0
dw StatusBool
db 0x1B
db 0
StatusSteerFM:
db '
No
Steering
',0
db '
Steer
Left
',0
db '
Steer
Right
',0
db '
Mute
',0
db 0
StatusModeFM:
db '
Mono
',0
db '
Stereo
',0
db 0
StatusADC:
db '
Microphone
',0
db '
CD
',0
db '
(
reserved
)
',0
db '
Line
',0
db 0
StatusFilter:
db '
Low
',0
db '
High
',0
db 0
StatusBool:
db '
off
',0
db '
on
'
,
0
db
0
This diff is collapsed.
Click to expand it.
SOURCE/SBPMIXER/PROCS.ASM
+
3
−
2
View file @
d38fa51a
...
...
@@ -42,11 +42,11 @@ Terminate_Proc:
StdOutStr_Proc:
pushm
ax
,
dx
.OutLoop:
mov
dl
,
[
di
]
mov
dl
,
[
si
]
inc
si
cmp
dl
,
0
je
.Done
StdOut
dl
inc
di
jmp
.OutLoop
.Done:
popm
ax
,
dx
...
...
@@ -175,6 +175,7 @@ Terminate_Proc:
clc
jmp
.Done
.Failed:
dec
si
stc
.Done:
pop
di
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment