Seb

Link to implemented task

Simple algorithm to check if a string has balanced square brackets or not. I go by the username SenTalker in RosettaCode.

  • November 22, 2021 at 2:09 PM
  • Last updated over 2 years ago
  • Visible to public
Rosettacode

Balanced brackets

Balanced brackets 28/04/2016 BALANCE CSECT USING BALANCE,R13 base register and savearea pointer SAVEAREA B STM-SAVEAREA(R15) DC 17F'0' STM STM R14,R12,12(R13) ST R13,4(R15) ST R15,8(R13) LR R13,R15 establish addressability LA R8,1 i=1 LOOPI C R8,=F'20' do i=1 to 20 BH ELOOPI MVC C(20),=CL20' ' c=' ' LA R1,1 LA R2,10 BAL