##QBIC, 44 bytes
QBIC, 44 bytes
::;;;X=A[q,a-2|X=X+C]X=X+A ?X[1,2|[1,b|?B]?X
Explanation
::;;; Get the input parameters, 2 numbers and 3 strings
X=A[q,a-2|X=X+C]X=X+A Build the horizontal string: The corner string, x-2 times the filler string and another corner
?X Print the horizontal string
[1,2| Do the next thing twice
[1,b|?B]?X Print the right number of vertical strings, then the horizontal string.
##QBIC, 44 bytes
::;;;X=A[q,a-2|X=X+C]X=X+A ?X[1,2|[1,b|?B]?X
Explanation
::;;; Get the input parameters, 2 numbers and 3 strings
X=A[q,a-2|X=X+C]X=X+A Build the horizontal string: The corner string, x-2 times the filler string and another corner
?X Print the horizontal string
[1,2| Do the next thing twice
[1,b|?B]?X Print the right number of vertical strings, then the horizontal string.
QBIC, 44 bytes
::;;;X=A[q,a-2|X=X+C]X=X+A ?X[1,2|[1,b|?B]?X
Explanation
::;;; Get the input parameters, 2 numbers and 3 strings
X=A[q,a-2|X=X+C]X=X+A Build the horizontal string: The corner string, x-2 times the filler string and another corner
?X Print the horizontal string
[1,2| Do the next thing twice
[1,b|?B]?X Print the right number of vertical strings, then the horizontal string.
##QBIC, 44 bytes
::;;;X=A[q,a-2|X=X+C]X=X+A ?X[1,2|[1,b|?B]?X
Explanation
::;;; Get the input parameters, 2 numbers and 3 strings
X=A[q,a-2|X=X+C]X=X+A Build the horizontal string: The corner string, x-2 times the filler string and another corner
?X Print the horizontal string
[1,2| Do the next thing twice
[1,b|?B]?X Print the right number of vertical strings, then the horizontal string.