Why does my MARIE code editor keep saying I have an error in this code?

I am trying to run this code I have for a project, which is supposed to sort some hexadecimal numbers from least to greatest using the bubblesort algorithm. I went through my code and I don’t really know where there could be any errors even with syntax. I am using the MARIE simulator to run these instructions, along with an online MARIE simulator as well just to make sure it is not a problem with my IDE. Another issue I have with this is that my Assembly Listing tab is completely blank whenever I try to pull up the error with my code. The only thing that it says on my MARIE editor is that I have one error and does not even specify the line. I narrowed it down to my attempt of making an array comprised of hexadecimals, should be line 4 in the code. The online MARIE simulator I use highlights the error on line 4 as well. I also cannot use anything like x86 to try and work this because the project has to be done on MARIE. Please help extremely confused and new to assembly code and how it works with regards to memory location. Here is the prompt:

Write an assembly code in MARIE to sort the following numbers (Hexadecimal) from maximum to minimum.

Numbers (HEX): 5, 35, 75, 45, 85, 25, 95, 55, 15, 65

·         You must store given values in the memory in the same order as given and as a hex value.

·         You must sort the values and store them in the same memory location where the original values are stored.

·         Your code should not ask any input value.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>ORG 1000 // Start of memory allocation
// Define variables
NUMBERS, HEX 5, 35, 75, 45, 85, 25, 95, 55, 15, 65
FLAG, DEC 0
// Constants
One, DEC 1
// Start of the program
Main, Load NUMBERS // Load the first number into AC
Store 2000 // Store it in a temporary location for swapping
Add One // Move to next number
Store X // Store the address of the next number
Loop1, Load X // Load the next number into AC
Skipcond 400 // If end of array is reached, exit the loop
Jump EndLoop1 // Jump to end of outer loop if end of array is reached
Load 2000 // Reload the first number into AC
Subt X // Compare the two numbers
Skipcond 800 // If AC is greater than or equal to X, jump
Jump Swap // Jump to swap the numbers
Jump Loop1 // Continue outer loop
Swap, Load X // Load the next number into AC
Store 3000 // Store it in a temporary location
Load 2000 // Load the first number into AC
Store X // Store it in the location of the next number
Load 3000 // Load the next number from the temporary location
Store 2000 // Store it in the location of the first number
Store FLAG // Set flag indicating a swap was made
Jump Loop1 // Continue outer loop
EndLoop1, Load FLAG // Load flag value
Skipcond 400 // If flag is 0 (no swaps), exit outer loop
Jump Main // Otherwise, repeat outer loop
// End of program
Halt // Halt the program
// Variables and constants allocation
X, DEC 0
</code>
<code>ORG 1000 // Start of memory allocation // Define variables NUMBERS, HEX 5, 35, 75, 45, 85, 25, 95, 55, 15, 65 FLAG, DEC 0 // Constants One, DEC 1 // Start of the program Main, Load NUMBERS // Load the first number into AC Store 2000 // Store it in a temporary location for swapping Add One // Move to next number Store X // Store the address of the next number Loop1, Load X // Load the next number into AC Skipcond 400 // If end of array is reached, exit the loop Jump EndLoop1 // Jump to end of outer loop if end of array is reached Load 2000 // Reload the first number into AC Subt X // Compare the two numbers Skipcond 800 // If AC is greater than or equal to X, jump Jump Swap // Jump to swap the numbers Jump Loop1 // Continue outer loop Swap, Load X // Load the next number into AC Store 3000 // Store it in a temporary location Load 2000 // Load the first number into AC Store X // Store it in the location of the next number Load 3000 // Load the next number from the temporary location Store 2000 // Store it in the location of the first number Store FLAG // Set flag indicating a swap was made Jump Loop1 // Continue outer loop EndLoop1, Load FLAG // Load flag value Skipcond 400 // If flag is 0 (no swaps), exit outer loop Jump Main // Otherwise, repeat outer loop // End of program Halt // Halt the program // Variables and constants allocation X, DEC 0 </code>
ORG 1000    // Start of memory allocation

// Define variables
NUMBERS, HEX 5, 35, 75, 45, 85, 25, 95, 55, 15, 65
FLAG, DEC 0

// Constants
One, DEC 1

// Start of the program
Main,   Load NUMBERS     // Load the first number into AC
        Store 2000       // Store it in a temporary location for swapping
        Add One          // Move to next number
        Store X          // Store the address of the next number
Loop1,  Load X           // Load the next number into AC
        Skipcond 400     // If end of array is reached, exit the loop
        Jump EndLoop1    // Jump to end of outer loop if end of array is reached
        Load 2000        // Reload the first number into AC
        Subt X       // Compare the two numbers
        Skipcond 800     // If AC is greater than or equal to X, jump
        Jump Swap        // Jump to swap the numbers
        Jump Loop1       // Continue outer loop

Swap,   Load X           // Load the next number into AC
        Store 3000       // Store it in a temporary location
        Load 2000        // Load the first number into AC
        Store X          // Store it in the location of the next number
        Load 3000        // Load the next number from the temporary location
        Store 2000       // Store it in the location of the first number
        Store FLAG       // Set flag indicating a swap was made
        Jump Loop1       // Continue outer loop

EndLoop1, Load FLAG      // Load flag value
         Skipcond 400    // If flag is 0 (no swaps), exit outer loop
         Jump Main       // Otherwise, repeat outer loop

// End of program
Halt     // Halt the program

// Variables and constants allocation
X, DEC 0

Line 4 error:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>NUMBERS, HEX 5, 35, 75, 45, 85, 25, 95, 55, 15, 65
</code>
<code>NUMBERS, HEX 5, 35, 75, 45, 85, 25, 95, 55, 15, 65 </code>
NUMBERS, HEX 5, 35, 75, 45, 85, 25, 95, 55, 15, 65

New contributor

Tyler Chetty is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật