I've only just began learning assembly this semester and am having a problem with my assignment. I need to write a code to display 0-9 and then A-Z on a 5x7 LED matrix on a EDS-8086 board via BGC-8088.
The problem I'm having is that the Data segment (DS) overrides the Code segment (CS) every time I load the assembled file onto the board. Here is my code so far, and the data segment is just one line to display R for now~
; file name : displayr.asm DATA SEGMENT; ASSUME DS:DATA ORG 002AH DATA1 BYTE 1EH, 11H, 11H, 1EH, 14H, 12H, 11H, 40H, 20H, 10H, 08H, 04H, 02H, 01H DATA ENDS CODE SEGMENT ASSUME CS:CODE ; ORG 100H ; MOV AX,@DATA ;initialize DS ; MOV DS,AX MOV DX,0FF13H ;set 8255 mode =0 MOV AL,89H ;Port A, B = output OUT DX,AL ;Port C = input MAIN PROC FAR MOV BX,[002AH] MOV SI,0031H MOV CX,0007H START: PUSH CX MOV DX,0FF10H MOV AL,[BX] NOT AL OUT DX,AL MOV DX,0FF11H MOV AL,[SI] OUT DX,AL MOV CX,0100 LOOP $ INC BX INC SI POP CX LOOP START JMP MAIN MAIN ENDP CODE ENDS END
Not many comments since I'm not really done with it but the problem is just that the DS overrides the CS. I omitted the initialize DS register cause the problem doesn't seem to be there. I use MASM32 to compile and assemble with a 16bit linker.
Details of the BCG-8088 base register.
AX,BX,CX,DX = 0000
CS,DS,SS,ES = 0100
I figure it has something to do with the register's being the same base, tried changing their origin offset to fit but it doesn't work, still overrides. Any input will help tremendously, I'm at a wall here T.T