scene.org File Archive

File download

<root>­/­parties­/­2023­/­vccc23­/­christmas-diamonds/raulgutierrez_pcxt_assembler_vc3-2023.zip

File size:
44 838 bytes (43.79K)
File date:
2024-01-03 14:15:18
Download count:
all-time: 3

Preview

  • CODE.PNG 42.30K
  • file_id.diz 1.95K
  • PC-XTar.ASM 1.36K
  • PC-XTar.COM 60B
  • RESULT.PNG 375B

file_id.diz

PC-XTar

Author: Raul Gutierrez
Category: Christmas Challenge
System: PC-XT compatible
Language: Turbo Assembler 4.1
Len source code: 1392 bytes (with most lines commented)
Len exe file: 60 bytes
Len code only: 60 bytes

Instructions:

Boot a PC-XT or newer
(I used a modern PC clone, but an old 8088 should be enough)
with real MSDOS
(I used MSDOS 6.22 but it should work on any MSDOS)
and run PC-XTar.COM typing PC-XTar at the command prompt
in the folder where that file resides.
Althought a DOS window (a DOS box under Windows) is NOT real
MSDOS, it MIGHT work there under certain conditions.

Description:

The program clears the screen and has 2 nested loops, for
iterating Y (ROW) and X (COLUMN) coordinates. Inside the inner
loop, X+Y MOD 6 and X-Y MOD 6 are calculated. If any of them is
0, an asterisk is displayed at the current X,Y. If not, the
program just skips writting.

Comments:

Seems easy, I first coded in Ruby and managed to have a working
70-byte source file program in that language.
But the most straight conversion to assembler just obtained a
64-byte executable, and reducing it from 64 to 60 has been very
hard and frustrating.
I couldn't save the text-mode screen in real DOS for the included
PNG capture, so I did what I could.

PRODUCING THE EXECUTABLE FILE FROM THE SOURCE CODE:
Using Borland Turbo Assembler 4.1 (1996) run:

TASM /m5 PC-XTAR.ASM,PC-XTAR.OBJ
TLINK /t /x PC-XTAR

Once obtained the .COM file with TLINK in second step,
you can delete the .OBJ file created with TASM on first step.

Removing the first line of source code (the "IDEAL" directive)
it MIGHT be assembled with Microsoft Macro Assembler with minor
or no changes at all, but the resulting .COM coud be a bit
longer if it doesn't use the shortest opcode for the JMP
instructions. Turbo Assembler does use the shortest JMP opcodes
with the /m5 switch, so I recommend leaving the code as is, and
using Turbo Assembler as explained above.